Registry / utility / error-chain

error-chain

JSON →
library0.12.4rscratesunverified

A library for easy error handling and boilerplate reduction.

# Cargo.toml [dependencies] error-chain = "0.12.4"
INSTALL
IMPORT
SIG · ERROR-CHAIN
E
error-chain
utilityrustv0.12.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

error_chain
use error_chain::error_chain;

Defines custom error types with automatic From implementations.

use error_chain::error_chain; error_chain! { foreign_links { Io(::std::io::Error); } } fn main() -> Result<()> { let _file = std::fs::File::open("nonexistent.txt")?; Ok(()) }
Debug
Known issues
gotchaMacro-based approach can lead to slower compile times and less IDE support.
fix
Consider using `thiserror` or `anyhow` for modern error handling.
affects: >=0.12.0
Upgrade
Version history
0.12.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
error-chain — cargo add error-chain · libregistry