mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Haml] Convert Haml::Error docs to YARD.
This commit is contained in:
parent
df7008b682
commit
63f0055be0
1 changed files with 7 additions and 7 deletions
|
@ -1,22 +1,22 @@
|
|||
module Haml
|
||||
# An exception raised by Haml code.
|
||||
class Error < StandardError
|
||||
# :stopdoc:
|
||||
|
||||
# By default, an error is taken to refer to the line of the template
|
||||
# that was being processed when the exception was raised.
|
||||
# However, if line is non-nil, it + 1 is used instead.
|
||||
# The line of the template on which the error occurred.
|
||||
#
|
||||
# @return [Fixnum]
|
||||
attr_reader :line
|
||||
|
||||
# @param message [String] The error message
|
||||
# @param line [Fixnum] See \{#line}
|
||||
def initialize(message = nil, line = nil)
|
||||
super(message)
|
||||
@line = line
|
||||
end
|
||||
# :startdoc:
|
||||
end
|
||||
|
||||
# SyntaxError is the type of exception raised when Haml encounters an
|
||||
# ill-formatted document.
|
||||
# It's not particularly interesting, except in that it includes Haml::Error.
|
||||
# It's not particularly interesting,
|
||||
# except in that it's a subclass of {Haml::Error}.
|
||||
class SyntaxError < Haml::Error; end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue