1 | |
package org.jbehave.core.failures; |
2 | |
|
3 | |
import static java.text.MessageFormat.format; |
4 | |
import static java.util.Arrays.asList; |
5 | |
|
6 | |
import java.lang.reflect.Method; |
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
@SuppressWarnings("serial") |
13 | |
public class BeforeOrAfterFailed extends RuntimeException { |
14 | |
|
15 | |
public BeforeOrAfterFailed(Method method, Throwable cause) { |
16 | 2 | super(format("Method {0}, annotated with {1}, failed", method, |
17 | |
asList(method.getAnnotations())), cause); |
18 | 2 | } |
19 | |
|
20 | |
public BeforeOrAfterFailed(Throwable cause) { |
21 | 1 | super(cause); |
22 | 1 | } |
23 | |
} |