Sha256: 9aac9c46daa5a00ebab9aa4f145933e1108b2a14b4ef1e6295d4840bd7e9bfc3

Contents?: true

Size: 1.16 KB

Versions: 80

Compression:

Stored size: 1.16 KB

Contents

# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013  Kouhei Sutou <kou@clear-code.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

module Grntest
  class Error < StandardError
  end

  class NotExist < Error
    attr_reader :path
    def initialize(path)
      @path = path
      super("<#{path}> doesn't exist.")
    end
  end

  class ParseError < Error
    attr_reader :type, :content, :reason
    def initialize(type, content, reason)
      @type = type
      @content = content
      @reason = reason
      super("failed to parse <#{@type}> content: #{reason}: <#{content}>")
    end
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
grntest-1.8.2 lib/grntest/error.rb
grntest-1.8.1 lib/grntest/error.rb
grntest-1.8.0 lib/grntest/error.rb
grntest-1.7.9 lib/grntest/error.rb
grntest-1.7.8 lib/grntest/error.rb
grntest-1.7.7 lib/grntest/error.rb
grntest-1.7.6 lib/grntest/error.rb
grntest-1.7.5 lib/grntest/error.rb
grntest-1.7.4 lib/grntest/error.rb
grntest-1.7.3 lib/grntest/error.rb
grntest-1.7.2 lib/grntest/error.rb
grntest-1.7.1 lib/grntest/error.rb
grntest-1.7.0 lib/grntest/error.rb
grntest-1.6.9 lib/grntest/error.rb
grntest-1.6.8 lib/grntest/error.rb
grntest-1.6.7 lib/grntest/error.rb
grntest-1.6.6 lib/grntest/error.rb
grntest-1.6.5 lib/grntest/error.rb
grntest-1.6.4 lib/grntest/error.rb
grntest-1.6.3 lib/grntest/error.rb