• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ekryd / sortpom / 3807

15 Oct 2024 05:03PM CUT coverage: 99.841%. Remained the same
3807

push

circleci

web-flow
chore(deps): update dependency org.mockito:mockito-core to v5.14.2

1256 of 1258 relevant lines covered (99.84%)

1.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/maven-plugin/src/main/java/sortpom/exception/ExceptionConverter.java
1
package sortpom.exception;
2

3
import org.apache.maven.plugin.MojoFailureException;
4

5
/**
6
 * Converts internal runtime FailureException in a method to a MojoFailureException in order to give
7
 * nice output to the Maven framework
8
 */
9
public class ExceptionConverter {
10
  private final Runnable method;
11

12
  public ExceptionConverter(Runnable method) {
1✔
13
    this.method = method;
1✔
14
  }
1✔
15

16
  public void executeAndConvertException() throws MojoFailureException {
17
    try {
18
      method.run();
1✔
19
    } catch (FailureException fex) {
1✔
20
      if (fex.getCause() != null) {
1✔
21
        throw new MojoFailureException(fex.getMessage(), fex.getCause());
1✔
22
      } else {
23
        throw new MojoFailureException(fex.getMessage());
1✔
24
      }
25
    }
1✔
26
  }
1✔
27
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc