BigDecimal.save_exception_mode { ... }
Class Public methods
Excecute the provided block, but preserve the exception mode
BigDecimal.save_exception_mode do BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) BigDecimal.new(BigDecimal('Infinity')) BigDecimal.new(BigDecimal('-Infinity')) BigDecimal(BigDecimal.new('NaN')) end
For use with the BigDecimal::EXCEPTION_*
See ::mode
Please login to continue.