Differences From Artifact [2310ecd9b2]:
- File graphspell-js/spellchecker.js — part of check-in [c075441c64] at 2018-02-17 10:13:11 on branch multid — [graphspell] spellchecker: handling exception when loading dictionary file (user: olr, size: 5036) [annotate] [blame] [check-ins using]
To Artifact [567dbb14f5]:
- File graphspell-js/spellchecker.js — part of check-in [ae469535bc] at 2018-02-17 11:31:08 on branch multid — [graphspell][js][bug] spellchecker: dictionary not always a filename string (user: olr, size: 5166) [annotate] [blame] [check-ins using] [more...]
| ︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | + |
if (typeof(require) !== 'undefined') {
return new ibdawg.IBDAWG(dictionary); // dictionary can be a filename or a JSON object
} else {
return new IBDAWG(dictionary, sPath); // dictionary can be a filename or a JSON object
}
}
catch (e) {
let sfDictionary = (typeof(dictionary) == "string") ? dictionary : dictionary.sLangName + "/" + dictionary.sFileName;
if (bNecessary) {
throw "Error: <" + sfDictionary + "> not loaded. " + e.message;
}
console.log("Error: <" + sfDictionary + "> not loaded.")
console.log(e.message);
return null;
}
|
| ︙ |