LogError class

Represents the result of a logging operation, including error status and details.

A LogError instance encapsulates an error code, an optional message, and optional additional data to describe the outcome of a logging-related action. It provides utilities to check success or failure and to merge multiple errors.

Example:

var error = LogError(0, message: "Success");
print(error.isSuccess); // true

Constructors

LogError(int error, {String message = '', dynamic data})
Creates a new LogError instance.

Properties

data ↔ dynamic
Additional data associated with the error, if any.
getter/setter pair
error int
The error code indicating the result of the operation.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isFail bool
Indicates whether the operation failed.
no setter
isSuccess bool
Indicates whether the operation was successful.
no setter
message String
A human-readable description of the error.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

mergeError(LogError newErr) → void
Merges this error with another LogError, prioritizing the most severe error.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of the error.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited