Sha256: 03a6ba724ecbbffd73296a99f6fc281f3d2e73198419dc93bde00e350bb0d7d8

Contents?: true

Size: 453 Bytes

Versions: 4

Compression:

Stored size: 453 Bytes

Contents

module Veewee
    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 
#   env.ui.info "Current failure: #{error.inspect}"
#   env.ui.info "Original failure: #{error.original.inspect}"
#end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veewee-0.3.0.alpha4 lib/veewee/error.rb
veewee-0.3.0.alpha3 lib/veewee/error.rb
veewee-0.3.0.alpha2 lib/veewee/error.rb
veewee-0.3.0.alpha1 lib/veewee/error.rb