Skip to content

Layer dependency rule ignores "catch" blocks #1232

@vprudnikov

Description

@vprudnikov

Hi!

I have a rule that verifies dependency between layers:

...
.whereLayer(LAYER_INFRASTRUCTURE).mayNotBeAccessedByAnyLayer()
...

The problem is that it doesn't work with catch blocks defined in other layers.

If I use an exception like this:
MyException ex = new MyException ("you will be caught"); then ArchUnit catches it.

However, if I use a catch block like so:
} catch (MyException e) {
then ArchUnit simply ignores it.

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