class Sass::SyntaxError
because of a faulty template.
It also provides a handy way to rescue only exceptions raised
and the Sass file that was being parsed (if applicable).
such as the line of the Sass template it was raised on
Sass::SyntaxError encapsulates information about the exception,
def add_backtrace_entry(filename) # :nodoc:
if applicable (defaults to "(sass)").
+filename+ should be the file in which the error occurred,
Adds a properly formatted entry to the exception's backtrace.
def add_backtrace_entry(filename) # :nodoc: @sass_filename ||= filename self.backtrace ||= [] self.backtrace.unshift "#{@sass_filename || '(sass)'}:#{@sass_line}" end
def initialize(msg, lineno = nil)
Creates a new SyntaxError.
def initialize(msg, lineno = nil) @message = msg @sass_line = lineno end
def to_s # :nodoc:
def to_s # :nodoc: @message end