fixed GH #141: Application::run() documentation/implementation discrepancy
This commit is contained in:
Родитель
5a8defd849
Коммит
dbe5a37106
|
@ -239,14 +239,15 @@ public:
|
|||
/// not been registered.
|
||||
|
||||
virtual int run();
|
||||
/// Runs the application by performing additional initializations
|
||||
/// Runs the application by performing additional (un)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.
|
||||
/// will be propagated to the caller. If uninitialize() throws
|
||||
/// an exception, the exception will be propagated to the caller.
|
||||
|
||||
std::string commandName() const;
|
||||
/// Returns the command name used to invoke the application.
|
||||
|
|
|
@ -318,12 +318,12 @@ void Application::stopOptionsProcessing()
|
|||
int Application::run()
|
||||
{
|
||||
int rc = EXIT_CONFIG;
|
||||
initialize(*this);
|
||||
|
||||
try
|
||||
{
|
||||
initialize(*this);
|
||||
rc = EXIT_SOFTWARE;
|
||||
rc = main(_unprocessedArgs);
|
||||
uninitialize();
|
||||
}
|
||||
catch (Poco::Exception& exc)
|
||||
{
|
||||
|
@ -337,6 +337,8 @@ int Application::run()
|
|||
{
|
||||
logger().fatal("system exception");
|
||||
}
|
||||
|
||||
uninitialize();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче