Skip to content

Commit

Permalink
Re-enable top-level exception catching (unless DEBUG_EXCEPTIONS)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutability committed Mar 22, 2019
1 parent 10e1805 commit 0945358
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions dump978_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,14 @@ static int realmain(int argc, char **argv) {
}

int main(int argc, char **argv) {
#ifndef DEBUG_EXCEPTIONS
try {
return realmain(argc, argv);
} catch (...) {
std::cerr << "Uncaught exception: " << boost::current_exception_diagnostic_information() << std::endl;
return 2;
}
#else
return realmain(argc, argv);
#endif
}
2 changes: 1 addition & 1 deletion faup978_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int realmain(int argc, char **argv) {
}

int main(int argc, char **argv) {
#if 0
#ifndef DEBUG_EXCEPTIONS
try {
return realmain(argc, argv);
} catch (...) {
Expand Down
2 changes: 1 addition & 1 deletion skyview978_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int realmain(int argc, char **argv) {
}

int main(int argc, char **argv) {
#if 0
#ifndef DEBUG_EXCEPTIONS
try {
return realmain(argc, argv);
} catch (...) {
Expand Down

0 comments on commit 0945358

Please sign in to comment.