Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Do Dez 29 2005 18:38:29 CET
file stats: LOC: 102   Methods: 5
NCLOC: 30   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
IllegalModuleDataException.java - 54,5% 60% 56,2%
coverage coverage
 1    /* $Id: IllegalModuleDataException.java,v 1.6 2005/08/19 04:11:53 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2005, 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.6 $
 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 Context context;
 38   
 39    /** Reference location to explain the error. */
 40    private Context 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 Context context, final Context referenceContext, final Exception cause) {
 53  2 super(message, cause);
 54  2 this.errorCode = errorCode;
 55  2 this.context = context;
 56  2 this.referenceContext = referenceContext;
 57    }
 58   
 59    /**
 60    * Constructor.
 61    *
 62    * @param errorCode Error code of this message.
 63    * @param message Error message.
 64    * @param context Error location.
 65    * @param cause Detailed exception information.
 66    */
 67  0 public IllegalModuleDataException(final int errorCode, final String message,
 68    final Context context, final Exception cause) {
 69  0 super(message, cause);
 70  0 this.errorCode = errorCode;
 71  0 this.context = context;
 72  0 this.referenceContext = null;
 73    }
 74   
 75    /**
 76    * Get context information about error location.
 77    *
 78    * @return Error location context.
 79    */
 80  5 public final Context getContext() {
 81  5 return context;
 82    }
 83   
 84    /**
 85    * Get additional context information about another associated location.
 86    *
 87    * @return Additional error location context.
 88    */
 89  0 public final Context getReferenceContext() {
 90  0 return referenceContext;
 91    }
 92   
 93    /**
 94    * Get error code.
 95    *
 96    * @return Error code.
 97    */
 98  1 public final int getErrorCode() {
 99  1 return errorCode;
 100    }
 101   
 102    }