commit f7418758ab6501171f732552c4f5d8eec3d11fe8
Author: Stephan Witt <[email protected]>
Date: Tue Nov 18 22:06:11 2014 +0100
use enchant exception message accessor
diff --git a/src/EnchantChecker.cpp b/src/EnchantChecker.cpp
index 6b53d2b..dc8ea4d 100644
--- a/src/EnchantChecker.cpp
+++ b/src/EnchantChecker.cpp
@@ -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;