Exception: Decimal::InvalidContext

Inherits:
Exception
  • Object
show all
Defined in:
lib/decimal/decimal.rb

Overview

Invalid context exception.

This occurs and signals invalid-operation if an invalid context was detected during an operation. This can occur if contexts are not checked on creation and either the precision exceeds the capability of the underlying concrete representation or an unknown or unsupported rounding was specified. These aspects of the context need only be checked when the values are required to be used. The result is NaN.

Instance Attribute Summary

Attributes inherited from Exception

#context

Class Method Summary collapse

Methods inherited from Exception

#initialize

Constructor Details

This class inherits a constructor from Decimal::Exception

Class Method Details

.handle(context, *args) ⇒ Object



246
247
248
# File 'lib/decimal/decimal.rb', line 246

def self.handle(context,*args)
  Decimal.nan
end