Skip to content

Commit 5b41342

Browse files
committed
Add exception handler for ISQL_main(), else isql crashes when unhandled exception happens
1 parent 8d6f7a4 commit 5b41342

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/isql/main.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,15 @@
2828

2929
int CLIB_ROUTINE main(int argc, char* argv[])
3030
{
31-
return ISQL_main(argc, argv);
31+
try
32+
{
33+
return ISQL_main(argc, argv);
34+
}
35+
catch (const Firebird::Exception& ex)
36+
{
37+
Firebird::StaticStatusVector st;
38+
ex.stuffException(st);
39+
isc_print_status(st.begin());
40+
}
41+
return 1;
3242
}

0 commit comments

Comments
 (0)