class Haml::Error

An exception raised by Haml code.

Constants

MESSAGES

Attributes

line[R]

The line of the template on which the error occurred.

@return [Fixnum]

Public Class Methods

message(key, *args) click to toggle source
# 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
new(message = nil, line = nil) click to toggle source

@param message [String] The error message @param line [Fixnum] See {#line}

Calls superclass method
# File lib/haml/error.rb, line 50
def initialize(message = nil, line = nil)
  super(message)
  @line = line
end