summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/errors.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-24 15:46:41 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-03-24 15:46:41 +0100
commitcba5b16c7568ce740af220512a4f489fe577173d (patch)
tree8160a96c09a14cb20290d12911bcd634a26c01cd /crawl-ref/source/errors.cc
parent7daf38ecd626d7528a56434d55f80f83a4125306 (diff)
downloadcrawl-ref-cba5b16c7568ce740af220512a4f489fe577173d.tar.gz
crawl-ref-cba5b16c7568ce740af220512a4f489fe577173d.zip
Offer to delete corrupted saves.
Diffstat (limited to 'crawl-ref/source/errors.cc')
-rw-r--r--crawl-ref/source/errors.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/errors.cc b/crawl-ref/source/errors.cc
index 2ae85bd2a2..0b325ab107 100644
--- a/crawl-ref/source/errors.cc
+++ b/crawl-ref/source/errors.cc
@@ -35,3 +35,13 @@ NORETURN void sysfail(const char *msg, ...)
throw ext_fail_exception(buf);
}
+
+NORETURN void corrupted(const char *msg, ...)
+{
+ va_list args;
+ va_start(args, msg);
+ std::string buf = vmake_stringf(msg, args);
+ va_end(args);
+
+ throw corrupted_save(buf);
+}