]> git.lyx.org Git - lyx.git/commitdiff
use enchant exception message accessor
authorStephan Witt <switt@lyx.org>
Tue, 18 Nov 2014 21:06:11 +0000 (22:06 +0100)
committerStephan Witt <switt@lyx.org>
Tue, 18 Nov 2014 21:06:27 +0000 (22:06 +0100)
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;