aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 45fef70c1f25fd2362939c456c0951be831a4c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
use custom_error::custom_error;

custom_error! { pub Error
    DsbInvalidWeek{ value: String } = "Week {value} is invalid",
    DsbInvalidHour{ value: String } = "Hour {value} is invalid",
    InvalidRoom{ value: String } = "Room {value} is invalid",
    InvalidCourse { value: String} = "Course {value} is invalid",

    Parse{ source: std::num::ParseIntError } = "Parser: {source}",
    Io{source: std::io::Error } = "IO: {source}"
}