Re-throw package activation exceptions in test mode

This commit is contained in:
Max Brunsfeld
2017-01-12 20:06:10 -08:00
committed by Nathan Sobo
parent e4a218ff45
commit a57b627a58
2 changed files with 10 additions and 1 deletions

View File

@@ -711,6 +711,9 @@ class Package
incompatibleNativeModules
handleError: (message, error) ->
if atom.inSpecMode()
throw error
if error.filename and error.location and (error instanceof SyntaxError)
location = "#{error.filename}:#{error.location.first_line + 1}:#{error.location.first_column + 1}"
detail = "#{error.message} in #{location}"