lib/scss_lint/engine.rb in scss_lint-0.57.1 vs lib/scss_lint/engine.rb in scss_lint-0.58.0
- old
+ new
@@ -32,15 +32,15 @@
@lines = @contents.force_encoding(encoding)
.encode(encoding, universal_newline: true)
.lines
@tree = @engine.to_tree
find_any_control_commands
- rescue Encoding::UndefinedConversionError, Sass::SyntaxError, ArgumentError => error
- if error.is_a?(Encoding::UndefinedConversionError) ||
- error.message.match(/invalid.*(byte sequence|character)/i)
+ rescue Encoding::UndefinedConversionError, Sass::SyntaxError, ArgumentError => e
+ if e.is_a?(Encoding::UndefinedConversionError) ||
+ e.message.match(/invalid.*(byte sequence|character)/i)
raise FileEncodingError,
- "Unable to parse SCSS file: #{error}",
- error.backtrace
+ "Unable to parse SCSS file: #{e}",
+ e.backtrace
else
raise
end
end