Class DataApiException

java.lang.Object java.lang.Throwable java.lang.Exception com.salesforce.functions.jvm.sdk.data.error.DataApiException All Implemented Interfaces: java.io.Serializable


public final class DataApiException extends java.lang.Exception

Signals that a data API error occurred.

Constructor Summary

ConstructorDescription
DataApiException (java.lang.String message)Constructs a DataApiException with the specified detail message.
DataApiException (java.lang.String message,java.lang.Throwable cause)Constructs a DataApiException with the specified detail message and cause.
DataApiException (java.lang.String message,java.util.List<DataApiError> errors)Constructs a DataApiException with the specified detail message and list of API errors.

Method Summary

Modifier and TypeMethodDescription
java.util.List<DataApiError>getDataApiErrors()Returns the list of DataApiError s that occurred.

Methods inherited from class java.lang.Throwable {#methods.inherited.from.class.java.lang.Throwable}

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object {#methods.inherited.from.class.java.lang.Object}

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Details

DataApiException

public DataApiException​(java.lang.String message)

Constructs a DataApiException with the specified detail message.

Parameters: message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)

DataApiException

public DataApiException​(java.lang.String message, java.lang.Throwable cause)

Constructs a DataApiException with the specified detail message and cause.

Parameters: message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method) cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

DataApiException

public DataApiException​(java.lang.String message, java.util.List<DataApiError> errors)

Constructs a DataApiException with the specified detail message and list of API errors.

Parameters: message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method) errors - The list API errors (which is saved for later retrieval by the getDataApiErrors() method)

Method Details

getDataApiErrors

@Nonnull public java.util.List<DataApiError> getDataApiErrors()

Returns the list of DataApiErrors that occurred. This list might be empty if the exception wasn't caused by an API error.

Returns: The list of DataApiErrors that occurred.