Exception: Flt::Num::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/flt/num.rb

Overview

Base class for exceptions.

All exception conditions derive from this class. The exception classes also define the values returned when trapping is disable for a particular exception.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context = nil) ⇒ Exception

Returns a new instance of Exception.



199
200
201
# File 'lib/flt/num.rb', line 199

def initialize(context=nil)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



198
199
200
# File 'lib/flt/num.rb', line 198

def context
  @context
end

Class Method Details

.handle(context, *args) ⇒ Object

Defines the value returned when trapping is inactive for the condition. The arguments are those passed to Context#exception after the message.



206
207
# File 'lib/flt/num.rb', line 206

def self.handle(context, *args)
end