domain_error 1.0.0 copy "domain_error: ^1.0.0" to clipboard
domain_error: ^1.0.0 copied to clipboard

Domain errors with Either, Result, and executeSafely for expected errors in Dart applications.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

1.0.0 - 2026-08-30 #

Added #

  • DomainError base type with a stable typeIdentifier, optional message, error, and stackTrace.
  • Either with failure and value branches, plus fold, when, and map.
  • Result, FutureResult, and FutureOrResult as Either aliases over DomainError.
  • executeSafely to catch throws and return a Result.
  • ExecuteSafelyOptions with mapThrownToError, onError, and onThrown.
1
likes
160
points
294
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Domain errors with Either, Result, and executeSafely for expected errors in Dart applications.

Repository (GitHub)
View/report issues

Topics

#error-handling #domain #exceptions

License

MIT (license)

Dependencies

collection, equatable, meta

More

Packages that depend on domain_error