ExceptionFlags

These flags indicate that an error has occurred. They indicate that a 0, NaN or an infinity value has been generated, that a result is inexact, or that a signalling NaN has been encountered. If the corresponding traps are set using DecimalControl, an exception will be thrown after setting these error flags.

By default the context will have all error flags lowered and exceptions are thrown only for severe errors.

Values

ValueMeaning
none0U

no error

invalidOperation1U << 0

InvalidOperationException is thrown if trap is set

divisionByZero1U << 1

DivisionByZeroException is thrown if trap is set

overflow1U << 2

OverflowException is thrown if trap is set

underflow1U << 3

UnderflowException is thrown if trap is set

inexact1U << 4

InexactException is thrown if trap is set

severeinvalidOperation | divisionByZero | overflow

group of errors considered severe: invalidOperation, divisionByZero, overflow

allsevere | underflow | inexact

all errors

Meta