Skip to content

Commit 3660d09

Browse files
gselzerctrueden
authored andcommitted
Add OpExecutionException
These should be thrown whenever there is a fatal error in the Op's Execution that DOES NOT have to do with the suitability of the parameters (IllegalArgumentException should be thrown instad)
1 parent d25b38a commit 3660d09

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package org.scijava.ops;
2+
3+
/**
4+
* Thrown to indicate that an Op failed in its execution
5+
*
6+
* @author Gabriel Selzer
7+
*
8+
*/
9+
public class OpExecutionException extends RuntimeException {
10+
11+
/**
12+
* Constructs a <code>OpExecutionException</code> with the specified reason for
13+
* failure.
14+
*
15+
* @param s
16+
* the reason for the failure
17+
*/
18+
public OpExecutionException(String s) {
19+
super(s);
20+
}
21+
22+
/**
23+
* Constructs a <code>OpExecutionException</code> with the specified cause.
24+
*
25+
* @param cause
26+
* the cause of the failure
27+
*/
28+
public OpExecutionException(Throwable cause) {
29+
super(cause);
30+
}
31+
32+
/**
33+
* Constructs a <code>OpExecutionException</code> with the specified reason for
34+
* failure and cause.
35+
*
36+
* @param message
37+
* the reason for the failure
38+
* @param cause
39+
* the cause of the failure
40+
*/
41+
public OpExecutionException(String message, Throwable cause) {
42+
super(message, cause);
43+
}
44+
45+
}

0 commit comments

Comments
 (0)