1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 03:18:00 +01:00

Fix some double-printed errors on :source, and make :source! work properly for Ex files.

This commit is contained in:
Kris Maglione
2010-10-09 13:10:41 -04:00
parent 7fc8283f79
commit 15df81361d

View File

@@ -391,12 +391,14 @@ lookup:
dactyl.execute(line, { setFrom: file }); dactyl.execute(line, { setFrom: file });
} }
catch (e) { catch (e) {
if (!silent) {
dactyl.echoerr("Error detected while processing " + file.path); dactyl.echoerr("Error detected while processing " + file.path);
dactyl.echomsg("line\t" + this.sourcing.line + ":"); dactyl.echomsg("line\t" + this.sourcing.line + ":");
dactyl.reportError(e, true); dactyl.reportError(e, true);
} }
} }
} }
}
if (this._scriptNames.indexOf(file.path) == -1) if (this._scriptNames.indexOf(file.path) == -1)
this._scriptNames.push(file.path); this._scriptNames.push(file.path);
@@ -406,6 +408,7 @@ lookup:
dactyl.log("Sourced: " + filename, 3); dactyl.log("Sourced: " + filename, 3);
} }
catch (e) { catch (e) {
if (!(e instanceof FailedAssertion))
dactyl.reportError(e); dactyl.reportError(e);
let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e); let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e);
if (!silent) if (!silent)