Clover coverage report - Maven Clover report
Coverage timestamp: Sun Mar 18 2007 17:42:32 CET
file stats: LOC: 40   Methods: 5
NCLOC: 28   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RMockSystemException.java 50% 90.9% 80% 83.3%
coverage coverage
 1    package com.agical.rmock.core.exception;
 2   
 3    import java.io.PrintWriter;
 4    import java.io.StringWriter;
 5   
 6    /**
 7    * @author brolund
 8    *
 9    * (c) 2005 Agical AB
 10    */
 11    public abstract class RMockSystemException extends RuntimeException {
 12    private static final long serialVersionUID = 1L;
 13   
 14  43 public RMockSystemException(String s) {
 15  43 super(s);
 16    }
 17   
 18  2 public RMockSystemException(String msg, Throwable cause) {
 19  2 super(getMessageAndCause(msg, cause));
 20    }
 21   
 22  0 public RMockSystemException(Throwable cause) {
 23  0 super(getMessageAndCause(null , cause));
 24    }
 25   
 26  22 public RMockSystemException() {
 27    }
 28   
 29  2 private static String getMessageAndCause(String msg, Throwable cause) {
 30  2 StringWriter writer = new StringWriter();
 31  2 PrintWriter printWriter = new PrintWriter(writer);
 32  2 if (msg != null) {
 33  2 printWriter.println(msg);
 34    }
 35  2 printWriter.println("caused by:");
 36  2 printWriter.println(cause);
 37  2 cause.printStackTrace(printWriter);
 38  2 return writer.toString();
 39    }
 40    }