summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-10-13 13:23:01 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-10-15 01:20:34 +0200
commit82fa3a4bb07cafbaee52b352811681f7992d1f72 (patch)
treec17d679d5845036dd11260748fb6a2827130f9e3 /crawl-ref/source/message.cc
parenta36a3603a88d01c3866dc0d6e1b2e614df53c4e1 (diff)
downloadcrawl-ref-82fa3a4bb07cafbaee52b352811681f7992d1f72.tar.gz
crawl-ref-82fa3a4bb07cafbaee52b352811681f7992d1f72.zip
Allow making MSGCH_ERROR fatal.
To do so, build with EXTERNAL_DEFINES=-DDEBUG_FATAL, like other debug fine-tuning defines.
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r--crawl-ref/source/message.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 587c21f6d5..bb2df53c98 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -1083,6 +1083,11 @@ void mpr(string text, msg_channel_type channel, int param, bool nojoin, bool cap
if (crawl_state.game_is_arena())
debug_channel_arena(channel);
+#ifdef DEBUG_FATAL
+ if (channel == MSGCH_ERROR)
+ die("%s", text.c_str());
+#endif
+
if (!crawl_state.io_inited)
{
if (channel == MSGCH_ERROR)