ErrorInfo

interface ErrorInfo

Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.

This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code , and access any additional error details such as messages or binding errors.

Inheritors

Types

Link copied to clipboard
object Companion

Companion object for ErrorInfo that provides constants and utility functions to work with ErrorInfo instances.

Properties

Link copied to clipboard

Provides a list of BindingError instances that occurred during the binding process. Each BindingError contains information about the error, including its name and a message describing the issue. This property returns an empty list if no binding errors are present.

Link copied to clipboard
abstract val errorCode: String

Represents the error code associated with an error. This value is used to identify the type of error that has occurred, which can be useful for debugging, logging, and handling errors in a standardized way.

Link copied to clipboard
abstract val errorMsg: String

Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user .

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.