1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-06-07 21:16:14 +01:00

Detect bad option files supplied via --options.

This commit is contained in:
hacksalot
2018-01-29 02:04:00 -05:00
parent 12a14dadeb
commit 17259cedbf
19 changed files with 149 additions and 13 deletions

View File

@ -17,7 +17,7 @@ module.exports = ( file ) ->
# We'll return HMSTATUS.readError or HMSTATUS.parseError.
retRaw = ret.raw && ret.raw.trim()
ret.ex =
operation: if retRaw then 'parse' else 'read'
op: if retRaw then 'parse' else 'read'
inner:
if SyntaxErrorEx.is( _error )
then (new SyntaxErrorEx( _error, retRaw ))

View File

@ -30,6 +30,7 @@ class SyntaxErrorEx
@line = (/on line (\d+)/.exec _error)[1]
# Return true if the supplied parameter is a JavaScript SyntaxError
SyntaxErrorEx.is = ( ex ) -> ex instanceof SyntaxError
module.exports = SyntaxErrorEx;