HivezBoxException class

Exception thrown for general box-level failures in the Hivez storage system.

This exception is used to indicate problems that occur at the box level, such as:

  • I/O errors (e.g., file system failures, permission issues)
  • Locking or concurrency violations
  • Data corruption or integrity problems
  • Unexpected internal errors specific to a particular box

The boxName parameter identifies the box where the error occurred, and the message should provide a clear, actionable description of the failure context.

Example usage:

try {
  await box.write('key', value);
} on HivezBoxException catch (e) {
  print('Box error: ${e.message}');
}
Inheritance

Constructors

HivezBoxException({required String boxName, required String message, Object? cause, StackTrace? stackTrace})
Creates a new HivezBoxException for the specified boxName and message.
const

Properties

cause Object?
The optional underlying cause of this exception.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
message String
A human-readable description of the failure.
finalinherited
name String
Returns the short class name of this exception for logging and debugging.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The optional stack trace captured at the time this exception was created.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a detailed string representation of this exception.
inherited

Operators

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