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.



196
197
198
# File 'lib/flt/num.rb', line 196

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

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



195
196
197
# File 'lib/flt/num.rb', line 195

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.



203
204
# File 'lib/flt/num.rb', line 203

def self.handle(context, *args)
end