diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/authserver/Main.cpp | 20 | ||||
-rw-r--r-- | src/server/worldserver/Main.cpp | 22 |
2 files changed, 3 insertions, 39 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index c57f8254d9c..cd58ec2bf68 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -58,7 +58,7 @@ boost::asio::deadline_timer _dbPingTimer(_ioService); uint32 _dbPingInterval; LoginDatabaseWorkerPool LoginDatabase; -int mainImpl(int argc, char** argv) +int main(int argc, char** argv) { std::string configFile = _TRINITY_REALM_CONFIG; auto vm = GetConsoleArguments(argc, argv, configFile); @@ -144,24 +144,6 @@ int mainImpl(int argc, char** argv) return 0; } -/// Launch the Trinity server -extern int main(int argc, char** argv) -{ - try - { - return mainImpl(argc, argv); - } - catch (std::exception& ex) - { - std::cerr << "Top-level exception caught:" << ex.what() << "\n"; - -#ifndef NDEBUG // rethrow exception for the debugger - throw; -#else - return 1; -#endif - } -} /// Initialize connection to the database bool StartDB() diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 06d8775440a..7b47dba8759 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -92,7 +92,8 @@ void ShutdownCLIThread(std::thread* cliThread); void ShutdownThreadPool(std::vector<std::thread>& threadPool); variables_map GetConsoleArguments(int argc, char** argv, std::string& cfg_file, std::string& cfg_service); -int mainImpl(int argc, char** argv) +/// Launch the Trinity server +extern int main(int argc, char** argv) { std::string configFile = _TRINITY_CORE_CONFIG; std::string configService; @@ -288,25 +289,6 @@ int mainImpl(int argc, char** argv) return World::GetExitCode(); } -/// Launch the Trinity server -extern int main(int argc, char** argv) -{ - try - { - return mainImpl(argc, argv); - } - catch (std::exception& ex) - { - std::cerr << "Top-level exception caught:" << ex.what() << "\n"; - -#ifndef NDEBUG // rethrow exception for the debugger - throw; -#else - return 1; -#endif - } -} - void ShutdownCLIThread(std::thread* cliThread) { if (cliThread != nullptr) |