diff --git a/src/error.rs b/src/error.rs index e4c9fec0..42a28c01 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,6 +10,7 @@ pub enum IxaError { JsonError(serde_json::Error), CsvError(csv::Error), Utf8Error(std::string::FromUtf8Error), + ParseIntError(std::num::ParseIntError), IxaError(String), } @@ -37,6 +38,12 @@ impl From for IxaError { } } +impl From for IxaError { + fn from(error: std::num::ParseIntError) -> Self { + IxaError::ParseIntError(error) + } +} + impl From for IxaError { fn from(error: String) -> Self { IxaError::IxaError(error)