-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
http://pocoproject.org/forum/viewtopic.php?f=12&t=5813
by Edsoon » Tue Mar 26, 2013 12:36 pm
/// Runs the application by performing additional initializations
/// and calling the main() method.
///
/// First calls initialize(), then calls main(), and
/// finally calls uninitialize(). The latter will be called
/// even if main() throws an exception. If initialize() throws
/// an exception, main() will not be called and the exception
/// will be propagated to the caller.
int Application::run()
{
int rc = EXIT_CONFIG;
try
{
initialize(*this);
rc = EXIT_SOFTWARE;
rc = main(_unprocessedArgs);
uninitialize();
}
catch (Poco::Exception& exc)
{
logger().log(exc);
}
catch (std::exception& exc)
{
logger().error(exc.what());
}
catch (...)
{
logger().fatal("system exception");
}
return rc;
}But method uninitialize() not called if method main throws exception. If this happens our program can not complete normally.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels