MCPcopy Create free account
hub / github.com/Ember-Moth/ppanel / new_err_msg

Method new_err_msg

crates/result/src/code_error.rs:44–49  ·  view source on GitHub ↗

Creates a `CodeError` for an unspecified failure (`ERROR` code). Mirrors Go `xerr.NewErrMsg`.

(err_msg: impl Into<String>)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected