mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Exceptions are caught in open/save command threads.
This commit is contained in:
parent
129d5a9b13
commit
5c2d31f3fe
@ -70,7 +70,12 @@ static void openfile_bg(void *fop_data)
|
||||
{
|
||||
FileOp* fop = (FileOp*)fop_data;
|
||||
|
||||
fop_operate(fop);
|
||||
try {
|
||||
fop_operate(fop);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
fop_error(fop, _("Error loading file:\n%s"), e.what());
|
||||
}
|
||||
|
||||
if (fop_is_stop(fop) && fop->sprite) {
|
||||
delete fop->sprite;
|
||||
|
@ -50,7 +50,12 @@ typedef struct SaveFileData
|
||||
static void savefile_bg(void *fop_data)
|
||||
{
|
||||
FileOp *fop = (FileOp *)fop_data;
|
||||
fop_operate(fop);
|
||||
try {
|
||||
fop_operate(fop);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
fop_error(fop, _("Error saving file:\n%s"), e.what());
|
||||
}
|
||||
fop_done(fop);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user