]> git.lyx.org Git - lyx.git/blobdiff - src/EnchantChecker.cpp
Account for old versions of Pygments
[lyx.git] / src / EnchantChecker.cpp
index 6b53d2bac568626869012ebad9b43ea03b33b558..dc8ea4d864af9e9ff5a589a0a840583ac4f803b5 100644 (file)
@@ -75,10 +75,11 @@ enchant::Dict * EnchantChecker::Private::addSpeller(string const & lang)
                LYXERR(Debug::FILES, "request enchant speller for language " << lang);
                m.speller = instance->request_dict(lang);
        }
-       catch (const enchant::Exception & e) {
+       catch (enchant::Exception & e) {
                // FIXME error handling?
-               // unfortunately the message of enchant::Exception is unreachable
-               LYXERR(Debug::FILES, "cannot add enchant speller, unspecified enchant exception in request_dict().");
+               const char * what = e.what();
+               LYXERR(Debug::FILES, "cannot add enchant speller: " <<
+                          ((what && *what) ? what : "unspecified enchant exception in request_dict()"));
                m.speller = 0;
        }
        spellers_[lang] = m;