This API documentation is for Ballerina 1.2.0. View API documentation for the latest release.

Functions - lang.error

detail

Returns the error's detail record.

reason

Returns the error's reason string.

stackTrace

Returns an object representing the stack trace of the error.

detail

(error e)

returns DetailType

Returns the error's detail record. The returned value will be immutable.

Parameters

  • e error
  • the error value

  • Return Type

    (DetailType)
  • error detail value

reason

(error e)

returns null

Returns the error's reason string.

Parameters

  • e error
  • the error value

  • Return Type

    (null)
  • error reason

stackTrace

(error e)

returns CallStack

Returns an object representing the stack trace of the error.

Parameters

  • e error
  • the error value

  • Return Type

    (CallStack)
  • a new object representing the stack trace of the error value