(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:
@@ -186,7 +186,7 @@ void FioOpenFile(int slot, const char *filename)
|
||||
FioFreeHandle();
|
||||
#endif /* LIMITED_FDS */
|
||||
f = FioFOpenFile(filename);
|
||||
if (f == NULL) error("Cannot open file '%s'", filename);
|
||||
if (f == NULL) usererror("Cannot open file '%s'", filename);
|
||||
uint32 pos = ftell(f);
|
||||
|
||||
FioCloseFile(slot); // if file was opened before, close it
|
||||
|
Reference in New Issue
Block a user