(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().

This commit is contained in:
glx
2008-06-05 20:54:52 +00:00
parent 5176319dd5
commit ee256e770a
19 changed files with 67 additions and 46 deletions

View File

@@ -317,6 +317,7 @@ assert_compile(sizeof(uint8) == 1);
#define CloseConnection OTTD_CloseConnection
#endif /* __APPLE__ */
void NORETURN CDECL usererror(const char *str, ...);
void NORETURN CDECL error(const char *str, ...);
#define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__)