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

Proposal: Custom exception class #17

Closed
JustBlackBird opened this issue Sep 15, 2016 · 1 comment · Fixed by #19
Closed

Proposal: Custom exception class #17

JustBlackBird opened this issue Sep 15, 2016 · 1 comment · Fixed by #19

Comments

@JustBlackBird
Copy link
Contributor

It would be useful if the assert can throw instance of custom exception class not only \InvalidArgumentException.

In my usecase every module throws exceptions implementing one extra interface (let's say \Acme\Foo\DomainExceptionInterface). This helps to catch only exception of exact module if it's needed. With current implementation of the library I cannot achieve it.

If the maintainer is interested in resolving this I could provide a PR.

@JustBlackBird
Copy link
Contributor Author

@webmozart I created a PR implementing this feature. Could you please review it?

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

Successfully merging a pull request may close this issue.

1 participant