diff options
Diffstat (limited to 'console/console.cpp')
| -rw-r--r-- | console/console.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/console/console.cpp b/console/console.cpp index 9a1d66f..f86dfc2 100644 --- a/console/console.cpp +++ b/console/console.cpp @@ -10,12 +10,10 @@ int main(int argc, char** argv) { try { ra::write(ra::parse(argc, argv)); } - catch (std::domain_error e) { - std::cerr << e.what() << '\n'; - return ra::INVALID_ARGUMENT; + catch (const std::system_error& e) { + std::cerr << e.what() << " (" << e.code() << ")\n"; } - catch (std::system_error e) { - std::cerr << "Error: " << e.what() << " (" << e.code() << ")\n"; - return ra::SYSTEM_ERROR; + catch (const std::exception& e) { + std::cerr << e.what() << '\n'; } } |