The OpenD Programming Language

Throw.onOverflow

Called automatically upon an overflow during a unary or binary operation.

  1. typeof(~Lhs()) onOverflow(Lhs lhs)
    struct Throw
    static
    typeof(~Lhs())
    onOverflow
    (
    string x
    Lhs
    )
    (
    Lhs lhs
    )
  2. typeof(Lhs() + Rhs()) onOverflow(Lhs lhs, Rhs rhs)

Parameters

x

The operator, e.g. -

lhs Lhs

The left-hand side (or sole) argument

Return Value

Type: typeof(~Lhs())

Nominally the result is the desired value of the operator, which will be forwarded as result. For Throw, the function never returns because it throws an exception.

Throws

CheckFailure on overflow

Meta