mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Handle uncaught exception during setup
This commit is contained in:
parent
382dfca7a8
commit
923ffbf25a
1 changed files with 8 additions and 1 deletions
|
@ -52,7 +52,14 @@ int main(int argc, char** argv) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto time_start = zeek::util::current_time(true);
|
auto time_start = zeek::util::current_time(true);
|
||||||
auto setup_result = zeek::detail::setup(argc, argv);
|
zeek::detail::SetupResult setup_result;
|
||||||
|
|
||||||
|
try {
|
||||||
|
setup_result = zeek::detail::setup(argc, argv);
|
||||||
|
} catch ( const zeek::InterpreterException& e ) {
|
||||||
|
fprintf(stderr, "Exception caught during initial setup\n");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
if ( setup_result.code )
|
if ( setup_result.code )
|
||||||
return setup_result.code;
|
return setup_result.code;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue