mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Add custom formatting for Less errors
This commit is contained in:
@@ -572,6 +572,14 @@ class Package
|
||||
SyntaxError: #{error.message}
|
||||
at #{location}
|
||||
"""
|
||||
else if error.type and error.filename and error.column? and error.line?
|
||||
# Less errors
|
||||
location = "#{error.filename}:#{error.line}:#{error.column}"
|
||||
detail = "#{error.message} in #{location}"
|
||||
stack = """
|
||||
Error: #{error.message}
|
||||
at #{location}
|
||||
"""
|
||||
else
|
||||
detail = error.message
|
||||
stack = error.stack ? error
|
||||
|
||||
@@ -319,6 +319,9 @@ class ThemeManager
|
||||
@lessCache.read(lessStylesheetPath)
|
||||
catch error
|
||||
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