Sha256: d4fa560c3cd0c661bff9a29a87198c66250387c96d43f14767126656a8bf0cc0

Contents?: true

Size: 643 Bytes

Versions: 16

Compression:

Stored size: 643 Bytes

Contents

module Veewee
  class Error < StandardError
    attr_reader :original

    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

  class WinrmError < 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

16 entries across 16 versions & 1 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/error.rb
veewee-0.5.0.alpha3 lib/veewee/error.rb
veewee-0.5.0.alpha2 lib/veewee/error.rb
veewee-0.5.0.alpha1 lib/veewee/error.rb
veewee-0.4.5.1 lib/veewee/error.rb
veewee-0.4.5 lib/veewee/error.rb
veewee-0.4.5.pre1 lib/veewee/error.rb
veewee-0.4.4 lib/veewee/error.rb
veewee-0.4.3 lib/veewee/error.rb
veewee-0.4.2 lib/veewee/error.rb
veewee-0.4.1 lib/veewee/error.rb
veewee-0.4.0 lib/veewee/error.rb
veewee-0.3.12 lib/veewee/error.rb
veewee-0.3.11 lib/veewee/error.rb
veewee-0.3.10 lib/veewee/error.rb
veewee-0.3.9 lib/veewee/error.rb