Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get original exception from ExceptionWrapper #2677

Closed
alexbowers opened this issue May 12, 2017 · 4 comments
Closed

Get original exception from ExceptionWrapper #2677

alexbowers opened this issue May 12, 2017 · 4 comments

Comments

@alexbowers
Copy link
Contributor

Please make it possible to get the original exception from the ExceptionWrapper, currently Throwable $t is not stored in the wrapper anywhere, so it is not possible to obtain the original exception.

This is useful for people who put their own properties within custom exceptions.

My usecase is that I want to override the run method, to output the actual exceptions rather than just that an exception has been thrown to make debugging simpler.

I can override and get the exception, but all that is contained is the properties code, etc. Not the original exception which for me has a property errors for validation errors.

Thanks.

@alexbowers
Copy link
Contributor Author

Implemented in #2678

@KamilKopaczyk
Copy link

Shouldn't this issue be reopened?
Merged pull request was later reverted, so this issue is a little bit misleading.

@alexbowers
Copy link
Contributor Author

@KamilKopaczyk I don't currently have the time to fix this, but if you want to take what I had as a starting point, i'm more than happy for that to happen.

I would still like to see this inside of phpunit.

@KamilKopaczyk
Copy link

Looks like originalException is not stored on purpose, as described in #1351.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants