diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-01-11 01:41:49 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-01-11 02:43:14 +0100 |
commit | 7971002b54b7aafb2bafe88a4e10f2062bad4727 (patch) | |
tree | f6244edf2a2a2d606bd2ca7a1ab59ec6a6731608 /crawl-ref/source/store.cc | |
parent | 461cf13dde0a61e42b702a6405d6711587c17820 (diff) | |
download | crawl-ref-7971002b54b7aafb2bafe88a4e10f2062bad4727.tar.gz crawl-ref-7971002b54b7aafb2bafe88a4e10f2062bad4727.zip |
A function die() that does the equivalent of ASSERT(!"foo") but always works.
It's what the old DEBUGSTR() did except for failing to be fatal in non-assert
builds.
Rationale: not aborting in known failure leads to further damage, and unlike
actual (conditional) assertions, there's no gain in skipping checks.
Diffstat (limited to 'crawl-ref/source/store.cc')
-rw-r--r-- | crawl-ref/source/store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/store.cc b/crawl-ref/source/store.cc index d1ca966932..33f4e93409 100644 --- a/crawl-ref/source/store.cc +++ b/crawl-ref/source/store.cc @@ -351,11 +351,11 @@ void CrawlStoreValue::unset(bool force) } case SV_NONE: - DEBUGSTR("CrawlStoreValue::unset: unsetting nothing"); + die("CrawlStoreValue::unset: unsetting nothing"); break; default: - DEBUGSTR("CrawlStoreValue::unset: unsetting invalid type"); + die("CrawlStoreValue::unset: unsetting invalid type"); break; } @@ -427,7 +427,7 @@ CrawlStoreValue &CrawlStoreValue::operator = (const CrawlStoreValue &other) break; default: - DEBUGSTR("CrawlStoreValue has invalid type"); + die("CrawlStoreValue has invalid type"); break; } |