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