diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-10-09 13:10:41 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-10-09 13:10:41 -0400 |
commit | 15df81361d02ce178f918717d959d88a8c00a332 (patch) | |
tree | cac40286d2f2f150bf32da07b818ed495b8bc06c /common/content/io.js | |
parent | 7fc8283f79a9694e756735787b9b1f3f90647250 (diff) | |
download | pentadactyl-15df81361d02ce178f918717d959d88a8c00a332.tar.gz |
Fix some double-printed errors on :source, and make :source! work properly for Ex files.
Diffstat (limited to 'common/content/io.js')
-rw-r--r-- | common/content/io.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/content/io.js b/common/content/io.js index 082904f9..305023ed 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -391,9 +391,11 @@ lookup: dactyl.execute(line, { setFrom: file }); } catch (e) { - dactyl.echoerr("Error detected while processing " + file.path); - dactyl.echomsg("line\t" + this.sourcing.line + ":"); - dactyl.reportError(e, true); + if (!silent) { + dactyl.echoerr("Error detected while processing " + file.path); + dactyl.echomsg("line\t" + this.sourcing.line + ":"); + dactyl.reportError(e, true); + } } } } @@ -406,7 +408,8 @@ lookup: dactyl.log("Sourced: " + filename, 3); } catch (e) { - dactyl.reportError(e); + if (!(e instanceof FailedAssertion)) + dactyl.reportError(e); let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e); if (!silent) dactyl.echoerr(message); |