Sha256: c28917fa47a02d084779da56114330b795ebacb11b205f186e73b4cfd21cb4b2
Contents?: true
Size: 642 Bytes
Versions: 2
Compression:
Stored size: 642 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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
veewee-atlassian-0.3.11 | lib/veewee/error.rb |
veewee-0.3.7 | lib/veewee/error.rb |