Execute a synchronous function and capture thrown exceptions as err.
Without onError, the raw thrown value is surfaced with type unknown;
pass onError to map it into a domain error — the error type is entirely
user-controlled.
Execute a synchronous function and capture thrown exceptions as err.
Without onError, the raw thrown value is surfaced with type unknown;
pass onError to map it into a domain error — the error type is entirely
user-controlled.
Execute a synchronous function and capture thrown exceptions as
err. WithoutonError, the raw thrown value is surfaced with typeunknown; passonErrorto map it into a domain error — the error type is entirely user-controlled.