]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
fix warning
[lyx.git] / src / Paragraph.cpp
index 5ab65b49a4603e75ea020d7cbf9d352f127416f8..2baa9b922e9ae4703fd3524f86c776835c5c56a8 100644 (file)
@@ -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_;
 }