- ensure that all throwables are caught
- use new sg_throwable::getFormattedMessage method
This commit is contained in:
parent
ff91dbfd7b
commit
58c936cc4e
1 changed files with 3 additions and 8 deletions
|
@ -1769,15 +1769,10 @@ int main ( int argc, char **argv ) {
|
||||||
// exceptions.
|
// exceptions.
|
||||||
try {
|
try {
|
||||||
mainLoop(argc, argv);
|
mainLoop(argc, argv);
|
||||||
} catch (sg_io_exception e1) {
|
} catch (sg_throwable &t) {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT,
|
SG_LOG(SG_GENERAL, SG_ALERT,
|
||||||
"Fatal error " << e1.getMessage()
|
"Fatal error: " << t.getFormattedMessage()
|
||||||
<< " received from " << e1.getOrigin()
|
<< "\n (received from " << t.getOrigin() << ')');
|
||||||
<< "\n at " << e1.getLocation().asString());
|
|
||||||
} catch (sg_exception e) {
|
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT,
|
|
||||||
"Fatal error " << e.getMessage()
|
|
||||||
<< " received from " << e.getOrigin());
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue