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

Version Path
mccloud-0.1.1 lib/mccloud/error.rb
mccloud-0.0.28 lib/mccloud/error.rb
mccloud-0.0.27 lib/mccloud/error.rb
mccloud-0.0.26 lib/mccloud/error.rb
mccloud-0.0.25 lib/mccloud/error.rb
mccloud-0.0.24 lib/mccloud/error.rb
mccloud-0.0.23 lib/mccloud/error.rb
mccloud-0.0.22 lib/mccloud/error.rb
mccloud-0.0.21 lib/mccloud/error.rb
mccloud-0.0.20 lib/mccloud/error.rb
mccloud-0.0.19 lib/mccloud/error.rb
mccloud-0.0.18 lib/mccloud/error.rb
mccloud-0.0.17 lib/mccloud/error.rb
mccloud-0.0.16 lib/mccloud/error.rb
mccloud-0.0.15 lib/mccloud/error.rb
mccloud-0.0.14 lib/mccloud/error.rb