(svn r15006) -Codechange: throw a real instance of a class, instead of '0' (which can also be a throw from within a thread for what ever reason)
This commit is contained in:
@@ -92,7 +92,7 @@ public:
|
||||
if (!IsRunning()) return false;
|
||||
|
||||
/* For now we terminate by throwing an error, gives much cleaner cleanup */
|
||||
throw 0;
|
||||
throw OTTDThreadExitSignal();
|
||||
}
|
||||
|
||||
/* virtual */ void Join()
|
||||
@@ -137,7 +137,9 @@ private:
|
||||
/* Call the proc of the creator to continue this thread */
|
||||
try {
|
||||
m_proc(m_param);
|
||||
} catch (OTTDThreadExitSignal e) {
|
||||
} catch (...) {
|
||||
NOT_REACHED();
|
||||
}
|
||||
|
||||
/* Notify threads waiting for our completion */
|
||||
|
Reference in New Issue
Block a user