Exception: Haml::Error
Overview
An exception raised by Haml code.
Direct Known Subclasses
Constant Summary
Instance Attribute Summary (collapse)
-
- (Fixnum) line
readonly
The line of the template on which the error occurred.
Class Method Summary (collapse)
Instance Method Summary (collapse)
-
- (Error) initialize(message = nil, line = nil)
constructor
A new instance of Error.
Constructor Details
- (Error) initialize(message = nil, line = nil)
A new instance of Error
50 51 52 53 |
# File 'lib/haml/error.rb', line 50
def initialize(message = nil, line = nil)
super(message)
@line = line
end
|
Instance Attribute Details
- (Fixnum) line (readonly)
The line of the template on which the error occurred.
46 47 48 |
# File 'lib/haml/error.rb', line 46
def line
@line
end
|
Class Method Details
+ message(key, *args)
38 39 40 41 |
# File 'lib/haml/error.rb', line 38
def self.message(key, *args)
string = MESSAGES[key] or raise "[HAML BUG] No error messages for #{key}"
(args.empty? ? string : string % args).rstrip
end
|