mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
fixed GH #141: Application::run() documentation/implementation discrepancy
This commit is contained in:
@@ -239,14 +239,15 @@ public:
|
|||||||
/// not been registered.
|
/// not been registered.
|
||||||
|
|
||||||
virtual int run();
|
virtual int run();
|
||||||
/// Runs the application by performing additional initializations
|
/// Runs the application by performing additional (un)initializations
|
||||||
/// and calling the main() method.
|
/// and calling the main() method.
|
||||||
///
|
///
|
||||||
/// First calls initialize(), then calls main(), and
|
/// First calls initialize(), then calls main(), and
|
||||||
/// finally calls uninitialize(). The latter will be called
|
/// finally calls uninitialize(). The latter will be called
|
||||||
/// even if main() throws an exception. If initialize() throws
|
/// even if main() throws an exception. If initialize() throws
|
||||||
/// an exception, main() will not be called and the exception
|
/// 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;
|
std::string commandName() const;
|
||||||
/// Returns the command name used to invoke the application.
|
/// Returns the command name used to invoke the application.
|
||||||
|
|||||||
@@ -318,12 +318,12 @@ void Application::stopOptionsProcessing()
|
|||||||
int Application::run()
|
int Application::run()
|
||||||
{
|
{
|
||||||
int rc = EXIT_CONFIG;
|
int rc = EXIT_CONFIG;
|
||||||
|
initialize(*this);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
initialize(*this);
|
|
||||||
rc = EXIT_SOFTWARE;
|
rc = EXIT_SOFTWARE;
|
||||||
rc = main(_unprocessedArgs);
|
rc = main(_unprocessedArgs);
|
||||||
uninitialize();
|
|
||||||
}
|
}
|
||||||
catch (Poco::Exception& exc)
|
catch (Poco::Exception& exc)
|
||||||
{
|
{
|
||||||
@@ -337,6 +337,8 @@ int Application::run()
|
|||||||
{
|
{
|
||||||
logger().fatal("system exception");
|
logger().fatal("system exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uninitialize();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user