|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LogicalCheckException | Line # 27 | 6 | 4 | 30% |
0.3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (12) | |||
| Result | |||
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative02
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative02
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative04
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative04
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative03
org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative03
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse2
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse2
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse1
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse1
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.service.QedeqBoFormalLogicCheckerTest.testCheckModule
org.qedeq.kernel.bo.service.QedeqBoFormalLogicCheckerTest.testCheckModule
|
1 PASS | |
|
0.3
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05
|
1 PASS | |
| 1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 2 | * | |
| 3 | * Copyright 2000-2010, Michael Meyling <mime@qedeq.org>. | |
| 4 | * | |
| 5 | * "Hilbert II" is free software; you can redistribute | |
| 6 | * it and/or modify it under the terms of the GNU General Public | |
| 7 | * License as published by the Free Software Foundation; either | |
| 8 | * version 2 of the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This program is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 | * GNU General Public License for more details. | |
| 14 | */ | |
| 15 | ||
| 16 | package org.qedeq.kernel.bo.logic.wf; | |
| 17 | ||
| 18 | import org.qedeq.kernel.base.list.Element; | |
| 19 | import org.qedeq.kernel.common.ModuleContext; | |
| 20 | import org.qedeq.kernel.common.ModuleDataException; | |
| 21 | ||
| 22 | /** | |
| 23 | * This is the basis for an exception for logical errors within a QEDEQ module. | |
| 24 | * | |
| 25 | * @author Michael Meyling | |
| 26 | */ | |
| 27 | public abstract class LogicalCheckException extends ModuleDataException { | |
| 28 | ||
| 29 | /** | |
| 30 | * This element causes the error. | |
| 31 | */ | |
| 32 | private final Element element; | |
| 33 | ||
| 34 | /** | |
| 35 | * Constructs an exception. | |
| 36 | * | |
| 37 | * @param errorCode ErrorCode of this message. | |
| 38 | * @param message What is the problem. | |
| 39 | * @param element Problematic line. | |
| 40 | * @param context Error location. | |
| 41 | * @param referenceContext Reference location. | |
| 42 | */ | |
| 43 | 0 |
public LogicalCheckException(final int errorCode, final String message, final Element element, |
| 44 | final ModuleContext context, final ModuleContext referenceContext) { | |
| 45 | 0 | super(errorCode, message, context, referenceContext); |
| 46 | 0 | this.element = element; |
| 47 | } | |
| 48 | ||
| 49 | /** | |
| 50 | * Constructs an exception. | |
| 51 | * | |
| 52 | * @param errorCode ErrorCode of this message. | |
| 53 | * @param message What is the problem. | |
| 54 | * @param element Problematic formula. | |
| 55 | * @param context Error location. | |
| 56 | */ | |
| 57 | 132 |
public LogicalCheckException(final int errorCode, final String message, |
| 58 | final Element element, final ModuleContext context) { | |
| 59 | 132 | super(errorCode, message, context); |
| 60 | 132 | this.element = element; |
| 61 | } | |
| 62 | ||
| 63 | /** | |
| 64 | * Get the element. | |
| 65 | * | |
| 66 | * @return element, that should have been a symbol | |
| 67 | */ | |
| 68 | 0 |
public final Element getElement() { |
| 69 | 0 | return this.element; |
| 70 | } | |
| 71 | ||
| 72 | /** | |
| 73 | * Returns a short description of this throwable. | |
| 74 | * If this <code>Throwable</code> object was created with a non-null detail | |
| 75 | * message string, then the result is the concatenation of five strings: | |
| 76 | * <ul> | |
| 77 | * <li>The name of the actual class of this object | |
| 78 | * <li>": " (a colon and a space) | |
| 79 | * <li>The result of the {@link Throwable#getMessage()} method for this object | |
| 80 | * <li>"\n" (a newline) | |
| 81 | * <li>A string representation of the {@link #getElement()} method for this object | |
| 82 | * </ul> | |
| 83 | * | |
| 84 | * @return a string representation of this throwable. | |
| 85 | */ | |
| 86 | 0 |
public final String toString() { |
| 87 | 0 | return super.toString() + "\n" + getElement().toString(); |
| 88 | } | |
| 89 | ||
| 90 | } | |
|
||||||||||