diff options
author | rubidium <rubidium@openttd.org> | 2009-09-07 11:10:49 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-07 11:10:49 +0000 |
commit | 2b144e2ea65e9ffc61b493a94063585c21b17a0e (patch) | |
tree | 4bf125c97b6dd57750015c5952888ebd12d9e2e1 /src/openttd.cpp | |
parent | 8186dd616b628d822abad295183c29de3d4b95ab (diff) | |
download | openttd-2b144e2ea65e9ffc61b493a94063585c21b17a0e.tar.xz |
(svn r17450) -Codechange: refactor the windows crash logger so parts of it can be reused by other crash logger implementations
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index a46a7a734..6297edacf 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -62,6 +62,7 @@ #include "highscore.h" #include "thread/thread.h" #include "station_base.h" +#include "crashlog.h" #include "newgrf_commons.h" @@ -124,10 +125,9 @@ void CDECL error(const char *s, ...) ShowOSErrorBox(buf, true); if (_video_driver != NULL) _video_driver->Stop(); - /* Don't go into NOT_REACHED here; NOT_REACHED is using error, so - * using it would result in an infinite loop instead of errors. */ - assert(0); - exit(1); + /* Set the error message for the crash log and then invoke it. */ + CrashLog::SetErrorMessage(buf); + abort(); } /** |