Sha256: 7ba445ac9d0d385c01b970c509d362cd67a8fadf6a02dc5691450ec1a7661126
Contents?: true
Size: 440 Bytes
Versions: 16
Compression:
Stored size: 440 Bytes
Contents
module Mccloud class Error < StandardError attr_reader :orginal def initialize(msg, original=$!) super(msg) @original = original; end end end #Usage (from the exceptional ruby book) #begin # begin # raise "Error A" # rescue => error # raise MyError, "Error B" # end #rescue => error. # puts "Current failure: #{error.inspect}" # puts "Original failure: #{error.original.inspect}" #end
Version data entries
16 entries across 16 versions & 1 rubygems