| 1 | |
package org.jbehave.core.failures; |
| 2 | |
|
| 3 | |
import java.lang.reflect.Method; |
| 4 | |
|
| 5 | |
import static java.text.MessageFormat.format; |
| 6 | |
import static java.util.Arrays.asList; |
| 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, asList(method.getAnnotations())), cause); |
| 17 | 2 | } |
| 18 | |
|
| 19 | |
public BeforeOrAfterFailed(Throwable cause) { |
| 20 | 1 | super(cause); |
| 21 | 1 | } |
| 22 | |
} |