class SafeCaller

Methods

__construct(Container $container)

No description

mixed
call(Closure $closure, Closure|null $default = null)

Execute the given closure, catching any exceptions and reporting them.

Details

at line 15
__construct(Container $container)

No description

Parameters

Container $container

at line 31
mixed call(Closure $closure, Closure|null $default = null)

Execute the given closure, catching any exceptions and reporting them.

A failing reporter must not replace the caught exception or prevent the caller's default from being returned.

Parameters

Closure $closure
Closure|null $default

Return Value

mixed