summaryrefslogtreecommitdiff
path: root/src/fileio.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-06-05 20:54:52 +0000
committerglx <glx@openttd.org>2008-06-05 20:54:52 +0000
commitee256e770afb5f04a6a10f3b2045dd426d3167ff (patch)
tree62bef57de81c1ddcc691d5de5e8db395615bdacc /src/fileio.cpp
parent5176319dd5145138604dd48c44b056693d900b10 (diff)
downloadopenttd-ee256e770afb5f04a6a10f3b2045dd426d3167ff.tar.xz
(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().
Diffstat (limited to 'src/fileio.cpp')
-rw-r--r--src/fileio.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp
index c35c4ae96..f68f6693e 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -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