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:
@ -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 ))
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user