conveniently disable error catching to keep callstacks
This commit is contained in:
@@ -221,12 +221,17 @@ static void handleFatalError(std::string what) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Comment this line out for exact exception callstacks:
|
||||||
|
#define CATCH_ERRORS
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
#if 0
|
#if 0
|
||||||
void debug_oldstructs();
|
void debug_oldstructs();
|
||||||
debug_oldstructs();
|
debug_oldstructs();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CATCH_ERRORS
|
||||||
try{
|
try{
|
||||||
|
#endif
|
||||||
cDialog::redraw_everything = &redraw_everything;
|
cDialog::redraw_everything = &redraw_everything;
|
||||||
|
|
||||||
init_boe(argc, argv);
|
init_boe(argc, argv);
|
||||||
@@ -252,6 +257,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
close_program();
|
close_program();
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifdef CATCH_ERRORS
|
||||||
} catch(std::exception& x) {
|
} catch(std::exception& x) {
|
||||||
handleFatalError(x.what());
|
handleFatalError(x.what());
|
||||||
throw;
|
throw;
|
||||||
@@ -262,6 +268,7 @@ int main(int argc, char* argv[]) {
|
|||||||
handleFatalError("An unknown error occurred!");
|
handleFatalError("An unknown error occurred!");
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_sbar(std::shared_ptr<cScrollbar>& sbar, const std::string& name, rectangle rect, rectangle events_rect, int max, int pgSz, int start = 0) {
|
static void init_sbar(std::shared_ptr<cScrollbar>& sbar, const std::string& name, rectangle rect, rectangle events_rect, int max, int pgSz, int start = 0) {
|
||||||
|
Reference in New Issue
Block a user