From 883fc8516dc1ced843ea10108a1db9911893cf33 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 18 Aug 2014 20:10:52 -0700 Subject: [PATCH] files.OfflineError prettier than [object Object] (It should also be caught at every httpHelpers.getUrl call and handled properly, but this is a start.) --- tools/files.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/files.js b/tools/files.js index b4853d6040..a50325323c 100644 --- a/tools/files.js +++ b/tools/files.js @@ -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 [].