Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
In the event a class' constructor throws an exception I think it would be better if that exception was thrown, not a DependencyException.
The code using the Container can more specifically target handling exceptions.
Most importantly this gives a more "honest" stack trace.
I see what you mean, I have merged locally your changes and proposed an alternative solution on #65.
Basically, I agree with you, except when it's a specific PHP-DI exception. Look at those 2 error message a user can get when getting an object from the container:
I find the first message not explicit enough.
So feel free to give your opinion on the new PR.
(btw if that's what you meant @domu1de currently exceptions are "chained", see line 77)