mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Custom errors should extend Exception, not StandardError.
This commit is contained in:
parent
c5d2bb774e
commit
1375eff365
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
module Haml
|
module Haml
|
||||||
# An exception raised by Haml code.
|
# An exception raised by Haml code.
|
||||||
class Error < StandardError
|
class Error < Exception
|
||||||
# :stopdoc:
|
# :stopdoc:
|
||||||
|
|
||||||
# By default, an error is taken to refer to the line of the template
|
# By default, an error is taken to refer to the line of the template
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Sass
|
||||||
# and the Sass file that was being parsed (if applicable).
|
# and the Sass file that was being parsed (if applicable).
|
||||||
# It also provides a handy way to rescue only exceptions raised
|
# It also provides a handy way to rescue only exceptions raised
|
||||||
# because of a faulty template.
|
# because of a faulty template.
|
||||||
class SyntaxError < StandardError
|
class SyntaxError < Exception
|
||||||
# The line of the Sass template on which the exception was thrown.
|
# The line of the Sass template on which the exception was thrown.
|
||||||
attr_accessor :sass_line
|
attr_accessor :sass_line
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue