1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
error_chain::error_chain! { errors { IllegalCharacter(name: String) { description("Illegal character") display("Illegal character in '{}' - limited to letters, numbers and underscores", name) } IllegalFirstCharacter(name: String) { description("Illegal first character") display("Illegal first character in '{}' - limited to letters", name) } EmptyName { description("Name in path is empty") display("Name in path is empty") } LeadingSlashMissing(path: String) { description("Leading slash is missing") display("Leading slash is missing in path {}", path) } MissingParent { description("Path has no parent due to being root path") display("Path has no parent due to being root path") } } }