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

Layer dependency rule ignores "catch" blocks #1232

Open
vprudnikov opened this issue Jan 17, 2024 · 0 comments
Open

Layer dependency rule ignores "catch" blocks #1232

vprudnikov opened this issue Jan 17, 2024 · 0 comments

Comments

@vprudnikov
Copy link

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.

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

1 participant