XFloat Documentation - 8. Handling Exception

Written by Integralus

8. Handling Exception

XFloat object throws XFloatError as exception if an error occurs. To handle this exception, you need to statement try ... catch.

Methods of XFloatError

  • .getErrMsg()

    Return a brief message of the occurred error.

  • .getErrType()

    Return a code of the occurred error. Return code can be one of below.

    "DIV0"Division by 0
    "INVALSQRT"Square root of negative
    "INVALLOG"Logarithm of 0 or negative
    "INVALIT"Inverse trigonometric of out of range
  • .toString()

    the same with .getErrMsg()

Handling Exception Example


Other languages