Class: Haml::Error

### Home Classes Methods

### In Files

- lib/haml/error.rb

### Parent

StandardError

### Methods

- ::message
- ::new

### Class/Module Index

Quicksearch

- Haml
- Haml::Buffer
- Haml::Compiler
- Haml::Engine
- Haml::Error
- Haml::ErubisTemplateHandler
- Haml::Exec
- Haml::Exec::Generic
- Haml::Exec::Haml
- Haml::Filters
- Haml::Filters::Base
- Haml::Filters::Cdata
- Haml::Filters::Css
- Haml::Filters::Erb
- Haml::Filters::Escaped
- Haml::Filters::Javascript
- Haml::Filters::Plain
- Haml::Filters::PrecompiledTiltFilter
- Haml::Filters::Preserve
- Haml::Filters::Ruby
- Haml::Filters::SassRailsTemplate
- Haml::Filters::ScssRailsTemplate
- Haml::Filters::TiltFilter
- Haml::Helpers
- Haml::Helpers::ActionViewExtensions
- Haml::Helpers::ErrorReturn
- Haml::Helpers::XssMods
- Haml::Options
- Haml::Parser
- Haml::Parser::Line
- Haml::Parser::ParseNode
- Haml::Plugin
- Haml::Railtie
- Haml::SafeErubisTemplate
- Haml::SyntaxError
- Haml::Template
- Haml::Util
- Haml::Util::StaticConditionalContext
- ActionView
- ActionView::Base
- ActionView::Helpers
- ActionView::Helpers::CaptureHelper
- ActionView::Helpers::FormHelper
- ActionView::Helpers::FormTagHelper
- ActionView::Helpers::HamlSupport
- ActionView::Helpers::InstanceTag
- ActionView::Helpers::TagHelper
- ActionView::Helpers::Tags
- ActionView::Helpers::Tags::TextArea
- ActionView::Helpers::TextHelper
- Object

No matching classes.

# 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}

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.