summaryrefslogtreecommitdiffstats
path: root/src/parse_error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse_error.rs')
-rw-r--r--src/parse_error.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/parse_error.rs b/src/parse_error.rs
new file mode 100644
index 0000000..8d06969
--- /dev/null
+++ b/src/parse_error.rs
@@ -0,0 +1,14 @@
+#[derive(Debug)]
+pub enum ParseError {
+ ParseIntError(std::num::ParseIntError),
+ ParseRangeError(crate::errors::ParseRangeError),
+}
+
+impl ToString for ParseError {
+ fn to_string(&self) -> String {
+ match self {
+ ParseError::ParseIntError(e) => e.to_string(),
+ ParseError::ParseRangeError(e) => e.to_string(),
+ }
+ }
+}