mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Merge pull request #6078 from atom/ks-associate-load-package-errors
Improve package association with uncaught errors
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
"url": "https://github.com/atom/atom.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"atom-package-manager": "0.147.0"
|
||||
"atom-package-manager": "0.149.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
"link": "0.30.0",
|
||||
"markdown-preview": "0.144.0",
|
||||
"metrics": "0.45.0",
|
||||
"notifications": "0.33.0",
|
||||
"notifications": "0.35.0",
|
||||
"open-on-github": "0.34.0",
|
||||
"package-generator": "0.38.0",
|
||||
"release-notes": "0.52.0",
|
||||
|
||||
@@ -572,6 +572,14 @@ class Package
|
||||
SyntaxError: #{error.message}
|
||||
at #{location}
|
||||
"""
|
||||
else if error.less and error.filename and error.column? and error.line?
|
||||
# Less errors
|
||||
location = "#{error.filename}:#{error.line}:#{error.column}"
|
||||
detail = "#{error.message} in #{location}"
|
||||
stack = """
|
||||
LessError: #{error.message}
|
||||
at #{location}
|
||||
"""
|
||||
else
|
||||
detail = error.message
|
||||
stack = error.stack ? error
|
||||
|
||||
@@ -318,7 +318,11 @@ class ThemeManager
|
||||
else
|
||||
@lessCache.read(lessStylesheetPath)
|
||||
catch error
|
||||
error.less = true
|
||||
if error.line?
|
||||
# Adjust line numbers for import fallbacks
|
||||
error.line -= 2 if importFallbackVariables
|
||||
|
||||
message = "Error compiling Less stylesheet: `#{lessStylesheetPath}`"
|
||||
detail = """
|
||||
Line number: #{error.line}
|
||||
|
||||
Reference in New Issue
Block a user