mirror of
https://github.com/JonasunderscoreJones/moddah.git
synced 2025-10-25 14:49:19 +02:00
added errorhandler
This commit is contained in:
parent
674333b030
commit
0bb721f8c9
1 changed files with 27 additions and 0 deletions
27
src/errorhandler/mod.rs
Normal file
27
src/errorhandler/mod.rs
Normal file
|
|
@ -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!
|
||||
")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue