class Sass::SyntaxError
All Sass errors are raised as {Sass::SyntaxError}s.
and the Sass file that was being parsed (if applicable).
the line of the Sass template it was raised on
An exception class that keeps track of
def add_backtrace_entry(filename) # :nodoc:
-
filename(String) -- The file in which the error occurred,
def add_backtrace_entry(filename) # :nodoc: @sass_filename ||= filename self.backtrace ||= [] self.backtrace.unshift "#{@sass_filename || '(sass)'}:#{@sass_line}" end
def add_metadata(filename, line)
-
(Sass::SyntaxError)- self
Parameters:
-
line(Fixnum) -- See \{#sass\_line} -
filename(String) -- See \{#sass\_filename}
def add_metadata(filename, line) self.sass_line ||= line add_backtrace_entry(filename) unless sass_filename raise self end
def initialize(msg, lineno = nil)
-
lineno(Fixnum) -- See \{#sass\_line} -
msg(String) -- The error message
def initialize(msg, lineno = nil) @message = msg @sass_line = lineno end
def to_s
-
(String)- The error message
def to_s @message end