Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
StepFailed |
|
| 1.0;1 |
1 | package org.jbehave.core.failures; | |
2 | ||
3 | import org.jbehave.core.model.OutcomesTable; | |
4 | ||
5 | /** | |
6 | * Thrown when a step execution has failed | |
7 | */ | |
8 | @SuppressWarnings("serial") | |
9 | public class StepFailed extends RuntimeException { | |
10 | ||
11 | public StepFailed(String step, Throwable cause) { | |
12 | 4 | super("'" + step + "': "+cause.getMessage()); |
13 | 4 | initCause(cause); |
14 | 4 | } |
15 | ||
16 | public StepFailed(String step, OutcomesTable table) { | |
17 | 1 | super("'" + step + "': "+table); |
18 | 1 | initCause(table.failureCause()); |
19 | 1 | } |
20 | ||
21 | } |