All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gem.gems.haml-3.1.1.lib.haml.error.rb Maven / Gradle / Ivy

There is a newer version: 1.263
Show newest version
module Haml
  # An exception raised by Haml code.
  class Error < StandardError
    # 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
  end

  # SyntaxError is the type of exception raised when Haml encounters an
  # ill-formatted document.
  # It's not particularly interesting,
  # except in that it's a subclass of {Haml::Error}.
  class SyntaxError < Haml::Error; end
end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy