Functions of ballerina.lang.exceptions package
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 set(exception e, string message, string category)
Set the message and the category.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
message | string | The exception message to be added |
category | string | The exception category to be added |
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 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 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 setMessage(exception e, string message)
Sets exception message specified exception
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
e | exception | The exception object |
message | string | The exception message to be added |
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 |