Skip to main content

to_napi_error

Function to_napi_error 

Source
pub fn to_napi_error(err: impl Display) -> Error
Expand description

Converts any displayable error into a napi error.

§Arguments

  • err - Any error type that implements Display.

§Returns

A napi::Error with GenericFailure status and the error message.