Exception: Decimal::DivisionUndefined

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

Overview

Undefined result of division exception.

This occurs and signals invalid-operation if division by zero was attempted (during a divide-integer, divide, or remainder operation), and the dividend is also zero.

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



149
150
151
# File 'lib/decimal/decimal.rb', line 149

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