1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 08:42:27 +01:00

Restore some of Doug's vim-compatible :source error messages. Also, don't crap out so easily on errors.

This commit is contained in:
Kris Maglione
2010-09-25 08:58:37 -04:00
parent d049c7f4a1
commit 03aceeb7af
3 changed files with 15 additions and 12 deletions

View File

@@ -386,7 +386,14 @@ lookup:
line = line.replace(/\r$/, "");
if (!/^\s*(".*)?$/.test(line))
dactyl.execute(line, { setFrom: file }, true);
try {
dactyl.execute(line, { setFrom: file }, true);
}
catch (e) {
dactyl.echoerr("Error detected while processing " + file.path);
dactyl.echomsg("line\t" + this.sourcing.line + ":");
dactyl.reportError(e, true);
}
}
}