Proper errors for missing arguments

This commit is contained in:
ConnorSkees 2020-02-16 12:17:34 -05:00
parent 9a36c3be73
commit 089edee8af

View File

@ -4,7 +4,7 @@ macro_rules! arg {
Some(v) => v, Some(v) => v,
None => match $args.get($name) { None => match $args.get($name) {
Some(v) => v, Some(v) => v,
None => panic!("missing variable"), None => return Err(concat!("Missing argument $", $name, ".").into()),
}, },
}; };
}; };