]> git.lyx.org Git - lyx.git/blob - src/support/lassert.h
listerrors.lyx : Update a link.
[lyx.git] / src / support / lassert.h
1 // -*- C++ -*-
2 /**
3  * \file support/lassert.h
4  *
5  * This file is part of LyX, the document processor.
6  * Licence details can be found in the file COPYING.
7  *
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef LASSERT_H
14 #define LASSERT_H
15
16 #ifdef __cplusplus
17 namespace lyx {
18
19 void doAssert(char const * expr, char const * file, long line);
20
21 /// Print demangled callstack to stderr
22 void printCallStack();
23
24
25 } // namespace lyx
26
27 #define LASSERT(expr, escape) \
28         if (expr) {} else { lyx::doAssert(#expr, __FILE__, __LINE__); escape; }
29 #endif
30
31 #endif // LASSERT