summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f042fd9)
Application::run can now be called multiple times, but not recursively.
Application::Application():
exit_code(0)
Application::Application():
exit_code(0)
+{
+ if(app_)
+ throw logic_error("instance already exists");
+}
int Application::run(int argc, char **argv, void *data)
{
int Application::run(int argc, char **argv, void *data)
{
- static bool called = false;
- if(called)
- {
- IO::cerr.write("Trying to call Application::run_app twice!\n");
- return 125;
- }
- called = true;
-
- IO::cerr.write("Trying to run with no RegisteredApplication class!\n");
+ IO::cerr.write("Application::run called with no RegisteredApplication class!\n");