error-kit 0.1.0

A comprehensive error handling library for Rust applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use error_kit::CommonError;

#[test]
fn test_helper_functions_create_correct_error_types() {
    let io_err = CommonError::io_error("test message");
    assert!(matches!(io_err, CommonError::Io(_)));

    let filename_err = CommonError::filename_error();
    assert!(matches!(filename_err, CommonError::FilenameError));

    let timestamp_err = CommonError::timestamp_parse_error();
    assert!(matches!(timestamp_err, CommonError::TimestampParseError));
}