public class ErrorUtils extends Object
| Constructor and Description |
|---|
ErrorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.ballerinalang.jvm.values.ErrorValue |
getBallerinaError(String error,
String details)
Returns error object for input reason and details.
|
static org.ballerinalang.jvm.values.ErrorValue |
getBallerinaError(String error,
Throwable ex)
Returns error object for input reason.
|
static String |
getGatewayVersion() |
public static org.ballerinalang.jvm.values.ErrorValue getBallerinaError(String error, Throwable ex)
error - Reason for creating the error object. If the reason is null, "UNKNOWN" sets by
default.ex - Java throwable object to capture description of error struct. If throwable object is null,
"Unknown Error" sets to message by default.public static org.ballerinalang.jvm.values.ErrorValue getBallerinaError(String error, String details)
error - The specific error type.details - Java throwable object to capture description of error struct. If throwable object is null,
"Unknown Error" is set to message by default.public static String getGatewayVersion()
Copyright © 2024 WSO2. All rights reserved.