Closed fastsol closed 5 years ago
This is in my service provider
public function register()
{
$container = $this->getContainer();
$container->share('errorHandler', function(){
return new Handler();
});
}
And this is how it's added
$container->addServiceProvider(new ErrorHandlerServiceProvider());
Are you using the version on dev-master
or the last tagged version?
I just tagged a v1.0.1 version, can you check if that fixes it?
The new version fixed that issue, thank you very much. I'm finding another issue now though, I'll make another post about it.
I have a slim project that has a custom errorHandler setup. It was working great before switching over to the league container. I have made a service provider for the errorHandler after trying the basic way of $container->share('errorHandler' function{}); and returning the custom handler.
This is the customer handler:
Then I try to throw this exception in the controller:
This is the code that throws the exception:
The furthest that the exception gets is the __construct and then the browser just returns the exception rather than calling the getReturn() like it should. I'm stuck on this.