(&self, f: &mut fmt::Formatter)
| 17 | |
| 18 | impl fmt::Display for Error { |
| 19 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
| 20 | let res = match self { |
| 21 | Error::InvalidMath(reason, element, line) => |
| 22 | format!("could not parse math {} at {} bc. {}", element, line, reason), |
| 23 | Error::InvalidDvisvgm(err) => |
| 24 | err.to_string(), |
| 25 | Error::FileNotFound(path) => |
| 26 | format!("could not find file {}", path.to_str().unwrap()), |
| 27 | Error::BinaryNotFound(binary) => |
| 28 | format!("binary not found: {}", binary), |
| 29 | Error::UnknownFence(kind) => |
| 30 | format!("unknown fence with name {}", kind), |
| 31 | Error::InvalidImage(path) => |
| 32 | format!("could not read in {} as image", path), |
| 33 | Error::Io(io_err) => format!("IO error: {}", io_err) |
| 34 | }; |
| 35 | |
| 36 | write!(f, "{}", res) |
| 37 | } |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected