2020-03-09 02:12:24 +01:00
|
|
|
#ifndef __PANIC_H__
|
|
|
|
#define __PANIC_H__
|
|
|
|
|
2020-04-24 08:36:29 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
# define __attribute__(x)
|
|
|
|
#endif
|
|
|
|
|
2020-03-11 15:23:58 +01:00
|
|
|
extern bool stop_at_panic;
|
|
|
|
extern bool i_have_panicked;
|
|
|
|
|
2020-03-09 02:12:24 +01:00
|
|
|
void panic(void);
|
2020-04-24 08:36:29 +02:00
|
|
|
void panic(const char* format, ...) __attribute__((__format__(__printf__, 1, 2)));
|
|
|
|
|
2020-03-09 02:12:24 +01:00
|
|
|
|
2020-04-08 12:49:00 +02:00
|
|
|
class DontStopAtPanic
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DontStopAtPanic() { stop_at_panic = false; i_have_panicked = false; }
|
|
|
|
~DontStopAtPanic() { stop_at_panic = true; i_have_panicked = false; }
|
|
|
|
};
|
|
|
|
|
2020-03-09 02:12:24 +01:00
|
|
|
#endif
|