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.
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.