File: errors.h

package info (click to toggle)
crawl 2%3A0.33.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,264 kB
  • sloc: cpp: 358,145; ansic: 27,203; javascript: 9,491; python: 8,359; perl: 3,327; java: 2,667; xml: 2,191; makefile: 1,830; sh: 611; objc: 250; cs: 15; sed: 9; lisp: 3
file content (29 lines) | stat: -rw-r--r-- 788 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include "tag-version.h"
#include <stdexcept>

NORETURN void fail(PRINTF(0, ));
NORETURN void sysfail(PRINTF(0, ));
NORETURN void corrupted(PRINTF(0, ));
void dump_test_fails(string fails, string name);

struct ext_fail_exception : public runtime_error
{
    ext_fail_exception(const string &msg) : runtime_error(msg) {}
    ext_fail_exception(const char *msg) : runtime_error(msg) {}
};

struct corrupted_save : public ext_fail_exception
{
    corrupted_save(const string &msg) : ext_fail_exception(msg) {}
    corrupted_save(const char *msg) : ext_fail_exception(msg) {}
    corrupted_save(const string &msg, save_version v) :
                ext_fail_exception(msg), version(v)
    {
    }

    save_version version; // defaults to -1,-1
};

extern bool CrawlIsCrashing;