X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=1b77a7c11273daadcf5c080fa77c369fe57ed65f;hp=8447eed669d2b8f58c9b078b547b1543b0bab27f;hb=1787d4928ac1285f5434a2c8d0676deea9ce9176;hpb=3bfc22d12b893d94cbb4697a77b7cababcbbd921 diff --git a/source/core/application.cpp b/source/core/application.cpp index 8447eed..1b77a7c 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -9,6 +9,7 @@ #include #include #include "application.h" +#include "except.h" #include "getopt.h" using namespace std; @@ -24,7 +25,7 @@ void *Application::_data = nullptr; Application::Application(const string &n) { if(_app) - throw logic_error("instance already exists"); + throw already_called("Application::Application"); if(!n.empty()) _name = n; @@ -94,7 +95,7 @@ int Application::run(int argc, char **argv, void *data, void (*created_callback) void Application::set_startup_info(const char *argv0, void *data) { if(_argv0) - throw logic_error("startup info already set"); + throw already_called("Application::set_startup_info"); static FS::Path exe; @@ -146,7 +147,7 @@ void Application::_sighandler(int s) Application::Starter::Starter() { if(_starter) - throw logic_error("Can't create more than one Starter instance"); + throw already_called("Application::Starter::Starter"); _starter = this; }