Sha256: 963110f1bbbd8687226abf30f019e4f5242bef341ec3798b5d74b06e2e985e34
Contents?: true
Size: 667 Bytes
Versions: 5
Compression:
Stored size: 667 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 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
veewee-0.3.6 | lib/veewee/error.rb |
veewee-0.3.5 | lib/veewee/error.rb |
veewee-0.3.4 | lib/veewee/error.rb |
veewee-0.3.3 | lib/veewee/error.rb |
veewee-0.3.2 | lib/veewee/error.rb |