X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Flassert.h;h=b142cc2f59de5709d32a906c096107d609686384;hb=759769131a4e5bd021ddb5e8fc5995a2af537e05;hp=5a47edfdb414ce5f327817a7d857f0a76cffa1d4;hpb=68408556c7bbab984cd405d7ae4bd9193697979d;p=lyx.git diff --git a/src/support/lassert.h b/src/support/lassert.h index 5a47edfdb4..b142cc2f59 100644 --- a/src/support/lassert.h +++ b/src/support/lassert.h @@ -21,7 +21,7 @@ namespace lyx { /****************************************************************************** -LyX has five different macros that can be used to make assertions. The behave +LyX has five different macros that can be used to make assertions. They behave the same way in devel mode: They assert. The differences between them are how they behave in release mode. @@ -31,15 +31,15 @@ LATTEST(expr) This macro should be used when one just wants to test expr. If devel mode, this will lead to an assertion. In release mode, we will simply continue. So LATTEST should be used only if you know, in advance, that it will be safe to - continue with the usual program flow, but failure of expr still means that + continue with the usual program flow, but failure of expr still means that there is something that needs to be fixed. LASSERT(expr, escape) - This macro should be used when a failure of expr is not compatible with + This macro should be used when a failure of expr is not compatible with continuing the ordinary program flow, but is something from which we can recover. This might mean simply returning early from some routine; it might mean resetting some variables to values known to be sane; it might mean - taking some other corrective action. + taking some other corrective action. LWARNIF(expr) This macro should be used when a failure of expr indicates that the current @@ -56,7 +56,7 @@ LAPPERR(expr) This macro should be used if a failure of expr is incompatible with LyX continuing to operate at all. In release mode, this issues an ErrorException, which typically results in an emergency shutdown. - + ******************************************************************************/ @@ -65,8 +65,10 @@ void doWarnIf(char const * expr, char const * file, long line); void doBufErr(char const * expr, char const * file, long line); void doAppErr(char const * expr, char const * file, long line); +void doAssertWithCallstack(bool value); + /// Print demangled callstack to stderr -void printCallStack(); +docstring printCallStack(); } // namespace lyx