mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
Re-throw package activation exceptions in test mode
This commit is contained in:
committed by
Nathan Sobo
parent
e4a218ff45
commit
a57b627a58
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user