mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Only unknown exceptions (invalid memory access, etc) are not caught in debug mode.
This commit is contained in:
parent
27c895732d
commit
055af25600
@ -147,11 +147,15 @@ void Context::execute_command(Command* command, Params* params)
|
||||
catch (std::exception& e) {
|
||||
console.printf("An error ocurred executing the command.\n\nDetails:\n%s", e.what());
|
||||
}
|
||||
#ifndef DEBUGMODE
|
||||
catch (...) {
|
||||
console.printf("An unknown error ocurred executing the command.\n"
|
||||
"Please try again or report this bug.\n\n"
|
||||
"Details: Unknown exception caught.");
|
||||
"Please save your work, close the program, try it\n"
|
||||
"again, and report this bug.\n\n"
|
||||
"Details: Unknown exception caught. This can be bad\n"
|
||||
"memory access, divison by zero, etc.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Context::on_add_sprite(Sprite* sprite)
|
||||
|
37
src/main.cpp
37
src/main.cpp
@ -60,36 +60,23 @@ public:
|
||||
int vaca_main()
|
||||
{
|
||||
int status = 1; // 1 = error
|
||||
Allegro allegro;
|
||||
|
||||
#ifndef DEBUGMODE
|
||||
try {
|
||||
#endif
|
||||
Jinete jinete;
|
||||
App app;
|
||||
|
||||
Allegro allegro;
|
||||
|
||||
#ifndef DEBUGMODE
|
||||
try {
|
||||
#endif
|
||||
|
||||
Jinete jinete;
|
||||
App app;
|
||||
|
||||
status = app.run();
|
||||
|
||||
#ifndef DEBUGMODE
|
||||
}
|
||||
catch (jexception& e) {
|
||||
e.show();
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
allegro_message(e.what());
|
||||
}
|
||||
catch (...) {
|
||||
allegro_message("Uncaught exception");
|
||||
}
|
||||
status = app.run();
|
||||
}
|
||||
catch (jexception& e) {
|
||||
e.show();
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
allegro_message(e.what());
|
||||
}
|
||||
#ifndef DEBUGMODE
|
||||
catch (...) {
|
||||
printf("Uncaught exception");
|
||||
allegro_message("Uncaught exception");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user