Creates a `CodeError` for an unspecified failure (`ERROR` code). Mirrors Go `xerr.NewErrMsg`.
(err_msg: impl Into<String>)
| 42 | /// |
| 43 | /// Mirrors Go `xerr.NewErrMsg`. |
| 44 | pub fn new_err_msg(err_msg: impl Into<String>) -> Self { |
| 45 | Self { |
| 46 | err_code: ERROR, |
| 47 | err_msg: err_msg.into(), |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /// Returns the error code shown to the front end. |
| 52 | pub fn get_err_code(&self) -> u32 { |
nothing calls this directly
no outgoing calls
no test coverage detected