Skip to content

Proposal: Custom exception class #17

Description

@JustBlackBird

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions