xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
AssertException.h
Go to the documentation of this file.
1#ifndef CORE_ASSERT_EXCEPTION_H
2#define CORE_ASSERT_EXCEPTION_H
3
4#include <iostream>
5
7
8#define DE_ASSERT(x, msg) \
9 { \
10 if (!(x)) { \
11 std::cerr << "ASSERTION FAILED: " << msg << "\n" \
12 << "File: " << __FILE__ << "\n" \
13 << "Line: " << __LINE__ << "\n"; \
14 } \
15 }
16
17#define DE_THROW(code, msg) throw Xale::Core::DbException(code, msg, __FILE__, __LINE__)
18
19#endif // CORE_ASSERT_EXCEPTION_H