files.OfflineError prettier than [object Object]

(It should also be caught at every httpHelpers.getUrl call and handled
properly, but this is a start.)
This commit is contained in:
David Glasser
2014-08-18 20:10:52 -07:00
parent 196089ae33
commit 883fc8516d

View File

@@ -834,6 +834,9 @@ files.FancySyntaxError = function () {};
files.OfflineError = function (error) {
this.error = error;
};
files.OfflineError.prototype.toString = function () {
return "[Offline: " + this.error.toString() + "]";
};
// Like fs.readdirSync, but skips entries whose names begin with dots, and
// converts ENOENT to [].