DefaultErrorInfo

data class DefaultErrorInfo(val errorCode: String, val errorMsg: String, val bindingErrors: List<BindingError> = emptyList()) : ErrorInfo, Materialized

Represents a default implementation of the ErrorInfo interface, providing a concrete structure for error information. This class includes an error code, an error message, and optionally a list of BindingError instances that can detail errors occurring during data binding processes. It also implements the Materialized interface, indicating it is a fully realized instance of ErrorInfo.

Parameters

errorCode

The unique identifier for the type of error.

errorMsg

A human-readable message describing the error.

bindingErrors

An optional list of BindingError objects, representing additional errors that occurred during the binding process. Defaults to an empty list if not provided.

Constructors

Link copied to clipboard
constructor(errorCode: String, errorMsg: String, bindingErrors: List<BindingError> = emptyList())

Properties

Link copied to clipboard
open override val bindingErrors: List<BindingError>
Link copied to clipboard
open override val errorCode: String
Link copied to clipboard
open override val errorMsg: String
Link copied to clipboard
open val succeeded: Boolean

Indicates whether the operation has succeeded based on the errorCode. It returns true if the errorCode is equal to SUCCEEDED, otherwise, it returns false.

Functions

Link copied to clipboard

Converts the current ErrorInfo instance into a Materialized if it is not already one. If the current instance is of type Materialized, it returns itself. Otherwise, it creates a new DefaultErrorInfo with the current error code, error message, and binding errors.