Skip to content
mariuszs edited this page Nov 8, 2014 · 5 revisions

Prerequisites

catch-exception-1.3.2 requires JDK 1.6 due to [http://code.google.com/p/catch-exception/wiki/Jdk15CompilerIssue a compiler issue of JDK 1.5].

= Download =

catch-exception-1.3.2 can be downloaded from [http://search.maven.org/#artifactdetails|eu.codearte.catch-exception|catch-exception|1.3.2|](Maven Central).

The Maven coordinates are

<dependency>
    <groupId>eu.codearte.catch-exception</groupId>
    <artifactId>catch-exception</artifactId>
    <version>1.3.2</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.3.2</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.

Mockito

catch-exception-1.3.2 depends on http://code.google.com/p/mockito/.

The maven coordinates of that dependency are

<dependency>
  <groupId>org.mockito</groupId>
  <artifactId>mockito-core</artifactId>
  <version>[1.8.1, 1.10.8]</version>
</dependency>

The library requires at least Mockito 1.8.1. Successfully tested versions are 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9.0-rc1, 1.9.0, 1.9.5-rc1, 1.9.5, 1.10.0+ up to 1.10.8 only.

The versions 1.5, 1.6, 1.7 and 1.10.9, 1.10.10 are not compatible with catch-exception.

PowerMock

catch-exception-1.3.2 optionally uses [http://code.google.com/p/powermock/ Powermock 1.5.5] in order to catch exceptions thrown by final classes.

The maven coordinates of that dependency are

{{{ org.powermock powermock-module-junit4 1.5.5 test org.powermock powermock-api-mockito 1.5.5 test }}}

The library requires at least PowerMock 1.5.5. Successfully tested versions are 1.5.6, 1.5.5, 1.5.4, 1.5.2, 1.5.1, 1.5.

Clone this wiki locally