From 0bb721f8c9f995151aa63bfb86468ac12ed0e9c7 Mon Sep 17 00:00:00 2001 From: Jonas_Jones <91549607+J-onasJones@users.noreply.github.com> Date: Tue, 20 Sep 2022 01:12:48 +0200 Subject: [PATCH] added errorhandler --- src/errorhandler/mod.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/errorhandler/mod.rs diff --git a/src/errorhandler/mod.rs b/src/errorhandler/mod.rs new file mode 100644 index 0000000..afd9566 --- /dev/null +++ b/src/errorhandler/mod.rs @@ -0,0 +1,27 @@ +pub(crate) fn error(error: &str) +{ + println!(" +ERROR: Couldn't find the given flag '{}'. + +Please check the provided flags. + +For help, run: + +moddah -h OR moddah --help + +", error) +} + +pub(crate) fn unexpectederror() +{ + println!("Oof, an unexpected error occured. Either something illegal happened or I did an oopsie. + +Either way, this is a fallback to prevent the program from crashing unexpectedly. + +Hopefully this won't happen again. Otherwhise please consider writing a bug report on GitHub at + +> https://github.com/J-onasJones/moddah/issues/. + +Thanks! + ") +} \ No newline at end of file