summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 46b497d6e..8474bc6f1 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -103,7 +103,13 @@ void *ServerThread::run()
* doesn't busy wait) and will process any remaining packets.
*/
- m_server->AsyncRunStep(true);
+ try {
+ m_server->AsyncRunStep(true);
+ } catch (con::ConnectionBindFailed &e) {
+ m_server->setAsyncFatalError(e.what());
+ } catch (LuaError &e) {
+ m_server->setAsyncFatalError(e);
+ }
while (!stopRequested()) {
try {
@@ -117,8 +123,7 @@ void *ServerThread::run()
} catch (con::ConnectionBindFailed &e) {
m_server->setAsyncFatalError(e.what());
} catch (LuaError &e) {
- m_server->setAsyncFatalError(
- "ServerThread::run Lua: " + std::string(e.what()));
+ m_server->setAsyncFatalError(e);
}
}