Simply error code.
This commit is contained in:
@@ -200,8 +200,10 @@ fn implementation_func(
|
||||
|
||||
// Evaluate the condition expression
|
||||
let stop = !engine.eval_expression_tree(context, scope, condition)?
|
||||
.as_bool().map_err(|_| EvalAltResult::ErrorBooleanArgMismatch(
|
||||
"do-while".into(), expr.position()))?;
|
||||
.as_bool()
|
||||
.map_err(|_| EvalAltResult::ErrorBooleanArgMismatch(
|
||||
"do-while".into(), expr.position()
|
||||
))?;
|
||||
|
||||
if stop {
|
||||
break;
|
||||
|
@@ -38,7 +38,7 @@ impl ModuleResolver for MyModuleResolver {
|
||||
let module: Module = load_secret_module(path);
|
||||
Ok(module)
|
||||
} else {
|
||||
Err(Box::new(EvalAltResult::ErrorModuleNotFound(path.into(), pos)))
|
||||
Err(EvalAltResult::ErrorModuleNotFound(path.into(), pos).into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user