void doAssert(char const * expr, char const * file, long line)
{
LYXERR0("ASSERTION " << expr << " VIOLATED IN " << file << ":" << line);
// comment this out if not needed
void doAssert(char const * expr, char const * file, long line)
{
LYXERR0("ASSERTION " << expr << " VIOLATED IN " << file << ":" << line);
// comment this out if not needed
{
docstring const d = _("Assertion %1$s violated in\nfile: %2$s, line: %3$s");
LYXERR0("ASSERTION " << expr << " VIOLATED IN " << file << ":" << line);
{
docstring const d = _("Assertion %1$s violated in\nfile: %2$s, line: %3$s");
LYXERR0("ASSERTION " << expr << " VIOLATED IN " << file << ":" << line);
-
- return bformat(d, from_ascii(expr), from_ascii(file),
+
+ return bformat(d, from_ascii(expr), from_ascii(file),
{
docstring const d = _("It should be safe to continue, but you\nmay wish to save your work and restart LyX.");
// comment this out if not needed
{
docstring const d = _("It should be safe to continue, but you\nmay wish to save your work and restart LyX.");
// comment this out if not needed
- BOOST_ASSERT(false);
- throw ExceptionMessage(WarningException, _("Warning!"),
+ doAssertWithCallstack(false);
+ throw ExceptionMessage(WarningException, _("Warning!"),
formatHelper(d, expr, file, line));
}
formatHelper(d, expr, file, line));
}
{
docstring const d = _("There has been an error with this document.\nLyX will attempt to close it safely.");
// comment this out if not needed
{
docstring const d = _("There has been an error with this document.\nLyX will attempt to close it safely.");
// comment this out if not needed
throw ExceptionMessage(BufferException, _("Buffer Error!"),
formatHelper(d, expr, file, line));
}
throw ExceptionMessage(BufferException, _("Buffer Error!"),
formatHelper(d, expr, file, line));
}
{
docstring const d = _("LyX has encountered an application error\nand will now shut down.");
// comment this out if not needed
{
docstring const d = _("LyX has encountered an application error\nand will now shut down.");
// comment this out if not needed
throw ExceptionMessage(ErrorException, _("Fatal Exception!"),
formatHelper(d, expr, file, line));
}
throw ExceptionMessage(ErrorException, _("Fatal Exception!"),
formatHelper(d, expr, file, line));
}
// get void*'s for all entries on the stack
void* array[depth];
size_t size = backtrace(array, depth);
// get void*'s for all entries on the stack
void* array[depth];
size_t size = backtrace(array, depth);