Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Sa Okt 21 2006 08:24:31 CEST
file stats: LOC: 103   Methods: 5
NCLOC: 31   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
IllegalModuleDataException.java - 54,5% 60% 56,2%
coverage coverage
 1    /* $Id: IllegalModuleDataException.java,v 1.7 2006/10/20 20:23:05 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2006, Michael Meyling <mime@qedeq.org>.
 6    *
 7    * "Hilbert II" is free software; you can redistribute
 8    * it and/or modify it under the terms of the GNU General Public
 9    * License as published by the Free Software Foundation; either
 10    * version 2 of the License, or (at your option) any later version.
 11    *
 12    * This program is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 15    * GNU General Public License for more details.
 16    */
 17   
 18    package org.qedeq.kernel.bo.control;
 19   
 20   
 21   
 22    /**
 23    * Data validation error. Occurs if a set or add method leads to wrong or inconsistent data.
 24    *
 25    * @version $Revision: 1.7 $
 26    * @author Michael Meyling
 27    */
 28    public class IllegalModuleDataException extends Exception {
 29   
 30    /** Serialization information. */
 31    private static final long serialVersionUID = 1L;
 32   
 33    /** Error code of this Exception. */
 34    private final int errorCode;
 35   
 36    /** Error location. */
 37    private ModuleContext context;
 38   
 39    /** Reference location to explain the error. */
 40    private ModuleContext referenceContext;
 41   
 42    /**
 43    * Constructor.
 44    *
 45    * @param errorCode Error code of this message.
 46    * @param message Error message.
 47    * @param context Error location.
 48    * @param referenceContext Reference location.
 49    * @param cause Detailed exception information.
 50    */
 51  2 public IllegalModuleDataException(final int errorCode, final String message,
 52    final ModuleContext context, final ModuleContext referenceContext,
 53    final Exception cause) {
 54  2 super(message, cause);
 55  2 this.errorCode = errorCode;
 56  2 this.context = context;
 57  2 this.referenceContext = referenceContext;
 58    }
 59   
 60    /**
 61    * Constructor.
 62    *
 63    * @param errorCode Error code of this message.
 64    * @param message Error message.
 65    * @param context Error location.
 66    * @param cause Detailed exception information.
 67    */
 68  0 public IllegalModuleDataException(final int errorCode, final String message,
 69    final ModuleContext context, final Exception cause) {
 70  0 super(message, cause);
 71  0 this.errorCode = errorCode;
 72  0 this.context = context;
 73  0 this.referenceContext = null;
 74    }
 75   
 76    /**
 77    * Get context information about error location.
 78    *
 79    * @return Error location context.
 80    */
 81  5 public final ModuleContext getContext() {
 82  5 return context;
 83    }
 84   
 85    /**
 86    * Get additional context information about another associated location.
 87    *
 88    * @return Additional error location context.
 89    */
 90  0 public final ModuleContext getReferenceContext() {
 91  0 return referenceContext;
 92    }
 93   
 94    /**
 95    * Get error code.
 96    *
 97    * @return Error code.
 98    */
 99  1 public final int getErrorCode() {
 100  1 return errorCode;
 101    }
 102   
 103    }