Change throwing string to throwing actual error
This commit is contained in:
parent
611d9be3aa
commit
f3f2601816
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue