forked from enviPath/enviPy
Current Dev State
This commit is contained in:
9
static/js/ketcher2/node_modules/watchify-middleware/lib/parse-error.js
generated
vendored
Normal file
9
static/js/ketcher2/node_modules/watchify-middleware/lib/parse-error.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// parses a syntax error for pretty-printing to console
|
||||
module.exports = parseError
|
||||
function parseError (err) {
|
||||
if (err.codeFrame) { // babelify@6.x
|
||||
return [err.message, err.codeFrame].join('\n\n')
|
||||
} else { // babelify@5.x and browserify
|
||||
return err.annotated || err.message
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user