Improve missing parameter panic message (#79)

Returning an InternalError in a map() is hard, so just panic, but give a
decent error message.
This commit is contained in:
Casey Rodarmor 2016-11-12 09:24:52 -08:00 committed by GitHub
parent 22a97b3e86
commit ff2ca9b30c

View File

@ -265,7 +265,7 @@ impl<'a> Recipe<'a> {
} else if let Some(ref default) = parameter.default {
(parameter.name, default.as_str())
} else {
panic!(); // FIXME internal error
panic!("Recipe.run: missing parameter without default. This is a bug in just.");
}).collect();
let mut evaluator = Evaluator {