Skip to main content

wrap_raw

Function wrap_raw 

Source
pub fn wrap_raw(error: WorktreeCopyError, message: &str) -> WorktreeCopyError
Expand description

What: Words a raw failure with the given message, and leaves an owned failure as it is. Why: Each wrapping step names the input it was handling, and never hides a message cli-git already wrote.

In TS you’d write (pseudocode):

error instanceof WorktreeCopyError ? error : new WorktreeCopyError(message, error)