Sha256: c6c1c4b777e91699d679225273fc7a3840f34ff9469a768987533fc65aed3e01

Contents?: true

Size: 629 Bytes

Versions: 8

Compression:

Stored size: 629 Bytes

Contents

module Veewee
    class Error < StandardError
      attr_reader :orginal
      def initialize(msg, original=$!)
        super(msg)
        @original = original; end
    end

    class DefinitionError < Error
    end

    class DefinitionNotExist < DefinitionError
    end

    class TemplateError < Error
    end

    class SshError < Error
    end
end

#Usage (from the exceptional ruby book)
#begin
#   begin
#     raise "Error A"
#   rescue => error
#     raise MyError, "Error B"
#   end
#rescue => error 
#   env.ui.info "Current failure: #{error.inspect}"
#   env.ui.info "Original failure: #{error.original.inspect}"
#end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
veewee-0.3.1 lib/veewee/error.rb
veewee-0.3.0.beta2 lib/veewee/error.rb
veewee-0.3.0.beta1 lib/veewee/error.rb
veewee-0.3.0.alpha9 lib/veewee/error.rb
veewee-0.3.0.alpha8 lib/veewee/error.rb
veewee-0.3.0.alpha7 lib/veewee/error.rb
veewee-0.3.0.alpha6 lib/veewee/error.rb
veewee-0.3.0.alpha5 lib/veewee/error.rb