]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Tooltips for collapsables and branches
[lyx.git] / src / TextClass.cpp
index 45c8fc6a304808c25251b60fcdc7465f7725d4b6..7a51403dd365596c1e34872fa3d7d6bcbea834df 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "frontends/alert.h"
 
+#include "support/ExceptionMessage.h"
 #include "support/lstrings.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
@@ -97,6 +98,8 @@ std::string translateRT(TextClass::ReadType rt)
        case TextClass::MODULE:
                return "module file";
        }
+       // shutup warning
+       return string();
 }
 
 } // namespace anon
@@ -478,11 +481,11 @@ bool TextClass::read(FileName const & filename, ReadType rt)
                FileName tmp = libFileSearch("layouts", "stdinsets.inc");
 
                if (tmp.empty()) {
-                       frontend::Alert::warning(_("Missing File"),
-                                       _("Could not find stdinsets.inc! This may lead to data loss!"));
+                       throw ExceptionMessage(WarningException, _("Missing File"),
+                               _("Could not find stdinsets.inc! This may lead to data loss!"));
                        error = true;
                } else if (read(tmp, MERGE)) {
-                       frontend::Alert::warning(_("Corrupt File"),
+                       throw ExceptionMessage(WarningException, _("Corrupt File"),
                                        _("Could not read stdinsets.inc! This may lead to data loss!"));
                        error = true;
                }