Functions of ballerina.lang.exceptions package
function getCategory(exception e) (string )
Gets the category of an exception
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string): The exception category |
function getMessage(exception e) (string )
Set message to an exception.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string): The exception message |
function getStackTrace(exception e) (string )
Gets the exception stack trace with the cause
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string) : The exception stacktrace |
function set(exception e, string m, string category)
Set the message and the category.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
m | string | e: The exception object |
category | string | The exception category to be added |
function setCategory(exception e, string category)
Set the category of an exception.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
category | string | The exception category to be added |
function setCause(exception e, exception cause)
Sets cause of the specified exception
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
cause | exception | The exception cause to be added |
function setMessage(exception e, string m)
Sets exception message specified exception
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
m | string | e: The exception object |