Class: Sass::SyntaxError

Class | Sass::SyntaxError
In: | lib/sass/error.rb
Parent: | StandardError

Sass::SyntaxError encapsulates information about the exception, such as the line of the Sass template it was raised on and the Sass file that was being parsed (if applicable). It also provides a handy way to rescue only exceptions raised because of a faulty template.

### Methods

new

### Attributes

sass_filename | [R] | The name of the file that was being parsed when the exception was raised. This will be nil unless Sass is being used as an ActionView plugin.
sass_line | [RW] | The line of the Sass template on which the exception was thrown.

### Public Class methods

new(msg, lineno = nil)

Creates a new SyntaxError. `lineno` should be the line of the Sass template on which the error occurred.

[Source]

        # File lib/sass/error.rb, line 17
    17:     def initialize(msg, lineno = nil)
    18:       @message = msg
    19:       @sass_line = lineno
    20:     end

[Validate]