• Return a safer version of a callback that runs inside a try/catch block.

    Type Parameters

    • T

    Parameters

    • logger: Logger

      Used to log errors.

    • className: string

      Type of callback, helps debugging when a function failed.

    • callback: Callback<T>

      The callback function is turn into a safer version.

    • callbackName: undefined | string
    • reason: string

    Returns Callback<T>