easy_err/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! 一个简易的错误包装器

mod err;
pub use err::Error;

#[cfg(test)]
mod test{
    use crate::Error;

	#[test]
	fn test() {
		let custom_err1 = Error::custom("Here is a custom error1.");
		let custom_err2 = Error::custom("Here is a custom error2.");
		custom_err1.log_to("./log.txt");
		custom_err2.log_to("./log.txt");
	}
}