Ballerina API Documentation

Functions of ballerina.lang.exceptions package

function setCause(exception e, exception cause)

Sets cause of the specified exception

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object
causeexceptionThe exception cause to be added

function set(exception e, string message, string category)

Set the message and the category.

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object
messagestringThe exception message to be added
categorystringThe exception category to be added

function getCategory(exception e) (string )

Gets the category of an exception

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object

Return Parameters:

Return VariableData TypeDescription
stringstring): The exception category

function getStackTrace(exception e) (string )

Gets the exception stack trace with the cause

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object

Return Parameters:

Return VariableData TypeDescription
stringstring) : The exception stacktrace

function setCategory(exception e, string category)

Set the category of an exception.

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object
categorystringThe exception category to be added

function setMessage(exception e, string message)

Sets exception message specified exception

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object
messagestringThe exception message to be added

function getMessage(exception e) (string )

Set message to an exception.

Parameters:

Parameter NameData TypeDescription
eexceptionThe exception object

Return Parameters:

Return VariableData TypeDescription
stringstring): The exception message


Menu

  • Functions
    • setCause(exception e, exception cause)
    • set(exception e, string message, string category)
    • getCategory(exception e) (string )
    • getStackTrace(exception e) (string )
    • setCategory(exception e, string category)
    • setMessage(exception e, string message)
    • getMessage(exception e) (string )

Copyright 2017 Ballerina API Documentation