Proper errors for missing arguments
This commit is contained in:
parent
9a36c3be73
commit
089edee8af
@ -4,7 +4,7 @@ macro_rules! arg {
|
||||
Some(v) => v,
|
||||
None => match $args.get($name) {
|
||||
Some(v) => v,
|
||||
None => panic!("missing variable"),
|
||||
None => return Err(concat!("Missing argument $", $name, ".").into()),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user