+
+ /// Create a LemmyError from error and message, including stack trace
+ pub fn from_error_message<E>(error: E, message: &'static str) -> Self
+ where
+ E: Into<anyhow::Error>,
+ {
+ LemmyError {
+ message: Some(message),
+ inner: error.into(),
+ context: SpanTrace::capture(),
+ }
+ }
+
+ /// Add message to existing LemmyError (or overwrite existing error)