Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #49 from AntelopeIO/add-exception-handler
Browse files Browse the repository at this point in the history
exception handler added to main function
  • Loading branch information
dimas1185 authored Apr 26, 2023
2 parents 286ab12 + da8c5af commit d1a884f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ int main(int argc, char** argv) {

try {
return runner.exec();
} catch(...) {
} catch(const std::exception& ex) {
antler::system::error_log("{}", ex.what());
return -1;
} catch(...) {
antler::system::error_log("unhandled exception");
return -2;
}
}

0 comments on commit d1a884f

Please sign in to comment.