File tree 2 files changed +11
-22
lines changed
2 files changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -494,8 +494,8 @@ void *EmergeThread::Thread()
494
494
try { // takes about 90ms with -O1 on an e3-1230v2
495
495
m_server->getScriptIface ()->environment_OnGenerated (
496
496
minp, maxp, mapgen->blockseed );
497
- } catch (LuaError &e) {
498
- m_server->setAsyncFatalError (e.what ());
497
+ } catch (LuaError &e) {
498
+ m_server->setAsyncFatalError (" Lua: " + std::string ( e.what () ));
499
499
}
500
500
501
501
EMERGE_DBG_OUT (" ended up with: " << analyze_block (block));
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class ServerThread : public JThread
86
86
void * Thread ();
87
87
};
88
88
89
- void * ServerThread::Thread ()
89
+ void *ServerThread::Thread ()
90
90
{
91
91
log_register_thread (" ServerThread" );
92
92
@@ -99,33 +99,22 @@ void * ServerThread::Thread()
99
99
100
100
porting::setThreadName (" ServerThread" );
101
101
102
- while (!StopRequested ())
103
- {
104
- try {
102
+ while (!StopRequested ()) {
103
+ try {
105
104
// TimeTaker timer("AsyncRunStep() + Receive()");
106
105
107
106
m_server->AsyncRunStep ();
108
107
109
108
m_server->Receive ();
110
109
111
- }
112
- catch (con::NoIncomingDataException &e)
113
- {
114
- }
115
- catch (con::PeerNotFoundException &e)
116
- {
110
+ } catch (con::NoIncomingDataException &e) {
111
+ } catch (con::PeerNotFoundException &e) {
117
112
infostream<<" Server: PeerNotFoundException" <<std::endl;
118
- }
119
- catch (ClientNotFoundException &e)
120
- {
121
- }
122
- catch (con::ConnectionBindFailed &e)
123
- {
124
- m_server->setAsyncFatalError (e.what ());
125
- }
126
- catch (LuaError &e)
127
- {
113
+ } catch (ClientNotFoundException &e) {
114
+ } catch (con::ConnectionBindFailed &e) {
128
115
m_server->setAsyncFatalError (e.what ());
116
+ } catch (LuaError &e) {
117
+ m_server->setAsyncFatalError (" Lua: " + std::string (e.what ()));
129
118
}
130
119
}
131
120
You can’t perform that action at this time.
0 commit comments