You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catch-exception can be downloaded from Maven Central.
The Maven coordinates are
<dependency>
<groupId>eu.codearte.catch-exception</groupId>
<artifactId>catch-exception</artifactId>
<version>1.4.4</version>
<scope>test</scope> <!-- test scope to use it only in tests -->
</dependency>
If you want to catch throwables, use
<dependency>
<groupId>eu.codearte.catch-exception</groupId>
<artifactId>catch-throwable</artifactId>
<version>1.4.4</version>
<scope>test</scope> <!-- test scope to use it only in tests -->
</dependency>
Dependencies
Users who do not use Maven or another dependeny management tool have to manually download the libraries catch-exception depends on, namely Mockito and, optionally, Powermock.
PowerMock
catch-exception optionally uses Powermock in order to catch exceptions thrown by final classes.