Skip to content
Advertisement

Tag: spring

Alternatives to JSP for Spring MVC view layer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed last year. The community reviewed whether to reopen this question last year and left it closed: Original

Best way to check whether a certain exception type was the cause (of a cause, etc …) in a nested exception?

I am writing some JUnit tests that verify that an exception of type MyCustomException is thrown. However, this exception is wrapped in other exceptions a number of times, e.g. in an InvocationTargetException, which in turn is wrapped in a RuntimeException. What’s the best way to determine whether MyCustomException somehow caused the exception that I actually catch? I would like to

Advertisement