Log spellchecker error also in html mode

pull/65/merge
Aleksander Machniak 13 years ago
parent 107cbd1a0e
commit cfe2fc8b30

@ -43,7 +43,7 @@ else {
} }
if ($err = $spellchecker->error()) { if ($err = $spellchecker->error()) {
raise_error(array('code' => 500, 'type' => 'php', rcube::raise_error(array('code' => 500, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__, 'file' => __FILE__, 'line' => __LINE__,
'message' => sprintf("Spell check engine error: " . $err)), 'message' => sprintf("Spell check engine error: " . $err)),
true, false); true, false);

@ -46,6 +46,11 @@ else if ($request['method'] == 'learnWord') {
} }
if ($error = $spellchecker->error()) { if ($error = $spellchecker->error()) {
rcube::raise_error(array('code' => 500, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => sprintf("Spell check engine error: " . $error)),
true, false);
echo '{"error":{"errstr":"' . addslashes($error) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'; echo '{"error":{"errstr":"' . addslashes($error) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}';
exit; exit;
} }

Loading…
Cancel
Save