Slightly more information on script errors in keyword reminder text

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@930 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-06-01 00:50:51 +00:00
parent 7845b9ef81
commit 97ccf34dce
2 changed files with 11 additions and 2 deletions
+6 -1
View File
@@ -591,7 +591,12 @@ String KeywordDatabase::expand(const String& text,
// Combine keyword & reminder with result
if (expand) {
String reminder = kw->reminder.invoke(ctx)->toString();
String reminder;
try {
reminder = kw->reminder.invoke(ctx)->toString();
} catch (const Error& e) {
handle_error(_ERROR_2_("in keyword reminder", e.what(), kw->keyword), true, false);
}
ctx.setVariable(_("keyword"), to_script(total));
ctx.setVariable(_("reminder"), to_script(reminder));
result += _("<kw-"); result += expand_type; result += _(">");