[EMAIL PROTECTED] wrote:
URL: http://www.lyx.org/trac/changeset/22974
Modified: lyx-devel/trunk/src/TextClass.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=22974
==============================================================================
--- lyx-devel/trunk/src/TextClass.cpp (original)
+++ lyx-devel/trunk/src/TextClass.cpp Wed Feb 13 13:37:11 2008
@@ -241,8 +241,11 @@
                lex.setStream(ss);
                Layout lay;
                lay.setName(emptylayout_);
-               /*bool error =*/ readStyle(lex, lay);
-               BOOST_ASSERT(!error);
+               if (!readStyle(lex, lay)) {
+                       // FIXME: Couldn't we provide some feedback to the user 
here?
+                       // Use ExceptionMessage maybe?
+                       BOOST_ASSERT(false);
+               }
The only way this can happen is a programming mistake. The layout is hardcoded. So if there is an error, the user won't be able to do anything about it.

I'll add a comment to that effect.

rh

Reply via email to