Change throwing string to throwing actual error

This commit is contained in:
Szymon Uglis 2021-02-14 12:28:45 +01:00
parent 611d9be3aa
commit f3f2601816
No known key found for this signature in database
GPG key ID: 112376C5BEE91FE2

View file

@ -11,7 +11,7 @@ class ArgChoice {
/// A Choice for the user to input in int & string args. You can only have an int or string option.
ArgChoice(this.name, dynamic value) {
if (value is! int && value is! String) {
throw "InvalidParamTypeError: Please send a string if its a string arg or an int if its an int arg.";
throw ArgumentError("Please send a string if its a string arg or an int if its an int arg");
}
this.value = value;