Improve error handling of beautify and testing
This commit is contained in:
parent
a5a00c893e
commit
0b2b06a928
|
@ -184,7 +184,7 @@ describe "BeautifyLanguages", ->
|
||||||
beautifyCompleted = false
|
beautifyCompleted = false
|
||||||
completionFun = (text) ->
|
completionFun = (text) ->
|
||||||
try
|
try
|
||||||
expect(text instanceof Error).not.toEqual(true, text.toString())
|
expect(text instanceof Error).not.toEqual(true, text.message or text.toString())
|
||||||
return beautifyCompleted = true if text instanceof Error
|
return beautifyCompleted = true if text instanceof Error
|
||||||
# logger.verbose(expectedTestPath, text) if ext is ".less"
|
# logger.verbose(expectedTestPath, text) if ext is ".less"
|
||||||
# if text instanceof Error
|
# if text instanceof Error
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Executable
|
||||||
if @isWindows() and returnCode is 1 and stderr.indexOf(windowsProgramNotFoundMsg) isnt -1
|
if @isWindows() and returnCode is 1 and stderr.indexOf(windowsProgramNotFoundMsg) isnt -1
|
||||||
throw @commandNotFoundError(exeName, help)
|
throw @commandNotFoundError(exeName, help)
|
||||||
else
|
else
|
||||||
throw new Error(stderr)
|
throw new Error(stderr or stdout)
|
||||||
else
|
else
|
||||||
if returnStderr
|
if returnStderr
|
||||||
stderr
|
stderr
|
||||||
|
|
Loading…
Reference in New Issue