(exit_code: ExitCode, msg: impl ToString)
| 51 | } |
| 52 | |
| 53 | pub fn error<T>(exit_code: ExitCode, msg: impl ToString) -> Result<T, JsonRpcError> { |
| 54 | Err(JsonRpcError { |
| 55 | code: exit_code.value().into(), |
| 56 | message: msg.to_string(), |
| 57 | data: None, |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | pub fn error_with_data<T, E: Serialize>( |
| 62 | exit_code: ExitCode, |
no test coverage detected