(&self, scope: Scope<'_>)
| 79 | } |
| 80 | |
| 81 | fn exec(&self, scope: Scope<'_>) -> CallResult<()> { |
| 82 | let arg = scope.get_string(0); |
| 83 | match arg { |
| 84 | "argument" => Err(CallError::Argument("Bad argument".to_owned())), |
| 85 | "eval" => Err(CallError::Eval("Some eval error".to_owned())), |
| 86 | "internal" => Err(CallError::Eval("Some internal error".to_owned())), |
| 87 | "io" => Err(CallError::from(io::Error::other("Some I/O error"))), |
| 88 | "syntax" => Err(CallError::Syntax(scope.get_pos(0), "Some syntax error".to_owned())), |
| 89 | "syntax0" => Err(CallError::Syntax(scope.get_pos(0), "Some syntax error".to_owned())), |
| 90 | "syntax1" => Err(CallError::Syntax(scope.get_pos(1), "Some syntax error".to_owned())), |
| 91 | _ => Err(CallError::Argument("Invalid arguments".to_owned())), |
| 92 | } |
| 93 | } |
| 94 | } |
nothing calls this directly
no test coverage detected