Improve error handling of beautify and testing

This commit is contained in:
Glavin Wiechert 2017-06-16 01:22:19 -03:00
parent a5a00c893e
commit 0b2b06a928
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ describe "BeautifyLanguages", ->
beautifyCompleted = false
completionFun = (text) ->
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
# logger.verbose(expectedTestPath, text) if ext is ".less"
# if text instanceof Error

View File

@ -179,7 +179,7 @@ class Executable
if @isWindows() and returnCode is 1 and stderr.indexOf(windowsProgramNotFoundMsg) isnt -1
throw @commandNotFoundError(exeName, help)
else
throw new Error(stderr)
throw new Error(stderr or stdout)
else
if returnStderr
stderr