diff options
author | glx <glx@openttd.org> | 2008-06-05 20:54:52 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-06-05 20:54:52 +0000 |
commit | ee256e770afb5f04a6a10f3b2045dd426d3167ff (patch) | |
tree | 62bef57de81c1ddcc691d5de5e8db395615bdacc /src/town_cmd.cpp | |
parent | 5176319dd5145138604dd48c44b056693d900b10 (diff) | |
download | openttd-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/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 97c111461..a9256a1a5 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1603,7 +1603,7 @@ bool GenerateTowns() if (num == 0 && CreateRandomTown(10000, TSM_RANDOM, 0) == NULL) { if (GetNumTowns() == 0) { /* XXX - can we handle that more gracefully? */ - if (_game_mode != GM_EDITOR) error("Could not generate any town"); + if (_game_mode != GM_EDITOR) usererror("Could not generate any town"); return false; } |