Skip to main content

try_main

Function try_main 

Source
pub fn try_main(run: impl FnOnce() -> OcelotResult<()>) -> ExitCode
Expand description

Runs a fallible CLI entrypoint and converts the result into a process exit code.

It runs a fallible entrypoint, prints a readable error report on failure, and converts the outcome into a process exit code.