Lazarus
Engine for creating roguelikes in C++
 All Classes Namespaces Functions
common.h
1 #pragma once
2 
3 #include <stdexcept>
4 
5 #ifndef NDEBUG
6 #include <cstdio>
7 #define DEBUG(...) do { printf(__VA_ARGS__); printf("\n"); } while (0)
8 #else
9 #define DEBUG(...)
10 #endif
11 
12 using ulong = unsigned long;
13 
19 namespace __lz
20 {
21 class LazarusException : public std::exception
22 {
23 public:
24  LazarusException(const std::string &msg)
25  : msg(msg)
26  {
27  }
28 
29  virtual const char* what() const throw()
30  {
31  return msg.c_str();
32  }
33 
34 private:
35  std::string msg;
36 };
37 }
Definition: common.h:21