• Run a callback 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.

    • value: T

      Value passed to the callback.

    • callbackName: undefined | string
    • reason: string

    Returns void