Clover Coverage Report - Liquibase Core 2.0.3-SNAPSHOT
Coverage timestamp: Sat Aug 6 2011 11:33:15 EDT
../../../img/srcFileCovDistChart0.png 69% of files have more coverage
12   39   6   3
4   31   0.5   4
4     1.5  
1    
 
  ErrorPrecondition       Line # 6 12 0% 6 20 0% 0.0
 
No Tests
 
1    package liquibase.precondition.core;
2   
3    import liquibase.changelog.DatabaseChangeLog;
4    import liquibase.precondition.Precondition;
5   
 
6    public class ErrorPrecondition {
7    private Throwable cause;
8    private Precondition precondition;
9    private DatabaseChangeLog changeLog;
10   
 
11  0 toggle 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   
 
17  0 toggle public Throwable getCause() {
18  0 return cause;
19    }
20   
 
21  0 toggle public Precondition getPrecondition() {
22  0 return precondition;
23    }
24   
 
25  0 toggle @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    }