curerr

Crates.iocurerr
lib.rscurerr
version1.1.0
sourcesrc
created_at2023-02-01 16:09:01.542999
updated_at2023-03-13 11:30:07.362815
descriptionRust crate for easy error handling
homepagehttps://github.com/CURVoid/curerr.git
repositoryhttps://github.com/CURVoid/curerr.git
max_upload_size
id773887
size16,803
(CURVoid)

documentation

https://docs.rs/curerr

README

Curerr v1.1.0

  • A crate for error handling

Documentation

Changelog

  • Added Call, Data option for CursedError
  • Added NotSupported option for CursedErrorType
  • Renamed CursedError enum option Argument to Input

v1.0.6 yank reasons

  • CursedError implementation wasn't complete
  • Documentation was old

Example

fn devide(a: i32, b: i32) -> Result<i32, CursedErrorHandle> {
    if b == 0 {
        return Err(CursedErrorHandle::new(
            CursedError::Argument(CursedErrorType::Invalid),
            "0 division!!!".to_string()
        ))
    }

    Ok(a/b)
}

let result = devide(6, 3).expect("division error");
Commit count: 6

cargo fmt