Exception: Flt::Num::Exception
- 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.
Direct Known Subclasses
Clamped, DivisionByZero, DivisionImpossible, DivisionUndefined, Inexact, InvalidContext, InvalidOperation, Overflow, Rounded, Subnormal, Underflow
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Class Method Summary collapse
-
.handle(context, *args) ⇒ Object
Defines the value returned when trapping is inactive for the condition.
Instance Method Summary collapse
-
#initialize(context = nil) ⇒ Exception
constructor
A new instance of Exception.
Constructor Details
#initialize(context = nil) ⇒ Exception
Returns a new instance of Exception.
198 199 200 |
# File 'lib/flt/num.rb', line 198 def initialize(context=nil) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
197 198 199 |
# File 'lib/flt/num.rb', line 197 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.
205 206 |
# File 'lib/flt/num.rb', line 205 def self.handle(context, *args) end |