1 |
|
package liquibase.precondition.core; |
2 |
|
|
3 |
|
import liquibase.changelog.DatabaseChangeLog; |
4 |
|
import liquibase.precondition.Precondition; |
5 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 6 |
Complexity Density: 0.5 |
|
6 |
|
public class ErrorPrecondition { |
7 |
|
private Throwable cause; |
8 |
|
private Precondition precondition; |
9 |
|
private DatabaseChangeLog changeLog; |
10 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
11 |
0
|
public ErrorPrecondition(Throwable exception, DatabaseChangeLog changeLog, Precondition precondition) {... |
12 |
0
|
this.cause = exception; |
13 |
0
|
this.changeLog = changeLog; |
14 |
0
|
this.precondition = precondition; |
15 |
|
} |
16 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
17 |
0
|
public Throwable getCause() {... |
18 |
0
|
return cause; |
19 |
|
} |
20 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
21 |
0
|
public Precondition getPrecondition() {... |
22 |
0
|
return precondition; |
23 |
|
} |
24 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
25 |
0
|
@Override... |
26 |
|
public String toString() { |
27 |
0
|
Throwable cause = this.cause; |
28 |
0
|
while (cause.getCause() != null) { |
29 |
0
|
cause = cause.getCause(); |
30 |
|
} |
31 |
|
|
32 |
0
|
String causeMessage = cause.getMessage(); |
33 |
0
|
if (changeLog == null) { |
34 |
0
|
return causeMessage; |
35 |
|
} else { |
36 |
0
|
return changeLog.toString() + " : " + causeMessage; |
37 |
|
} |
38 |
|
} |
39 |
|
} |