Creates a `CodeError` whose message is looked up from [`map_err_msg`]. Mirrors Go `xerr.NewErrCode`.
(err_code: u32)
| 22 | /// |
| 23 | /// Mirrors Go `xerr.NewErrCode`. |
| 24 | pub fn new_err_code(err_code: u32) -> Self { |
| 25 | Self { |
| 26 | err_code, |
| 27 | err_msg: map_err_msg(err_code).to_string(), |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /// Creates a `CodeError` with an explicit code and message. |
| 32 | /// |
nothing calls this directly
no test coverage detected