X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraph.cpp;h=2baa9b922e9ae4703fd3524f86c776835c5c56a8;hb=2f271f61bcd514da3ab5b44d2b7bf61e12ac0c44;hp=5ab65b49a4603e75ea020d7cbf9d352f127416f8;hpb=f83a38b3defc997f808539d0dfd618f5ba71e13c;p=lyx.git diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 5ab65b49a4..2baa9b922e 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -52,6 +52,7 @@ #include "support/lassert.h" #include "support/convert.h" #include "support/debug.h" +#include "support/ExceptionMessage.h" #include "support/gettext.h" #include "support/lstrings.h" #include "support/Messages.h" @@ -457,7 +458,7 @@ void Paragraph::insertInset(pos_type pos, Inset * inset, bool Paragraph::eraseChar(pos_type pos, bool trackChanges) { - LASSERT(pos >= 0 && pos <= size(), /**/); + LASSERT(pos >= 0 && pos <= size(), return false); // keep the logic here in sync with the logic of isMergedOnEndOfParDeletion() @@ -2416,7 +2417,8 @@ void Paragraph::setPlainOrDefaultLayout(DocumentClass const & tclass) Inset const & Paragraph::inInset() const { - LASSERT(d->inset_owner_, exit(10)); + LASSERT(d->inset_owner_, throw ExceptionMessage(BufferException, + _("Memory problem"), _("Paragraph not properly initiliazed"))); return *d->inset_owner_; }