Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 4117a94

Browse files
Add cause
1 parent ebc9973 commit 4117a94

File tree

1 file changed

+3
-2
lines changed
  • packages/google-closure-compiler/lib/gulp

1 file changed

+3
-2
lines changed

packages/google-closure-compiler/lib/gulp/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ class CompilationStream extends stream.Transform {
190190
// stdOutData = stdOutData.substr(stdOutData.indexOf('{'));
191191
try {
192192
outputFiles = JSON.parse(stdOutData);
193-
} catch {
194-
cb(new PluginError(this.PLUGIN_NAME_, 'Error parsing json encoded files'));
193+
} catch (err) {
194+
const encodingError = new Error('Error parsing json encoded files', { cause: err });
195+
cb(new PluginError(this.PLUGIN_NAME_, encodingError));
195196
return;
196197
}
197198
}

0 commit comments

Comments
 (0)