|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LogicalCheckException | Line # 30 | 6 | 4 | 30% |
0.3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(11) | |||
Result | |||
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.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.xml.parser.CharsetParserTest.testParse2 org.qedeq.kernel.xml.parser.CharsetParserTest.testParse2 | 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.logic.wf.CheckLogicTest.testNegative04 org.qedeq.kernel.bo.logic.wf.CheckLogicTest.testNegative04 | 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.testNegative05 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05 | 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.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 | |
1 | /* $Id: LogicalCheckException.java,v 1.1 2008/07/26 07:58:29 m31 Exp $ | |
2 | * | |
3 | * This file is part of the project "Hilbert II" - http://www.qedeq.org | |
4 | * | |
5 | * Copyright 2000-2008, 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.logic.wf; | |
19 | ||
20 | import org.qedeq.kernel.base.list.Element; | |
21 | import org.qedeq.kernel.common.ModuleContext; | |
22 | import org.qedeq.kernel.common.ModuleDataException; | |
23 | ||
24 | /** | |
25 | * This is the basis for an exception for logical errors within a QEDEQ module. | |
26 | * | |
27 | * @version $Revision: 1.1 $ | |
28 | * @author Michael Meyling | |
29 | */ | |
30 | public abstract class LogicalCheckException extends ModuleDataException { | |
31 | ||
32 | /** | |
33 | * This element causes the error. | |
34 | */ | |
35 | private final Element element; | |
36 | ||
37 | /** | |
38 | * Constructs an exception. | |
39 | * | |
40 | * @param errorCode ErrorCode of this message. | |
41 | * @param message What is the problem. | |
42 | * @param element Problematic line. | |
43 | * @param context Error location. | |
44 | * @param referenceContext Reference location. | |
45 | */ | |
46 | 0 | public LogicalCheckException(final int errorCode, final String message, final Element element, |
47 | final ModuleContext context, final ModuleContext referenceContext) { | |
48 | 0 | super(errorCode, message, context, referenceContext); |
49 | 0 | this.element = element; |
50 | } | |
51 | ||
52 | /** | |
53 | * Constructs an exception. | |
54 | * | |
55 | * @param errorCode ErrorCode of this message. | |
56 | * @param message What is the problem. | |
57 | * @param element Problematic formula. | |
58 | * @param context Error location. | |
59 | */ | |
60 | 131 | public LogicalCheckException(final int errorCode, final String message, |
61 | final Element element, final ModuleContext context) { | |
62 | 131 | super(errorCode, message, context); |
63 | 131 | this.element = element; |
64 | } | |
65 | ||
66 | /** | |
67 | * Get the element. | |
68 | * | |
69 | * @return element, that should have been a symbol | |
70 | */ | |
71 | 0 | public final Element getElement() { |
72 | 0 | return this.element; |
73 | } | |
74 | ||
75 | /** | |
76 | * Returns a short description of this throwable. | |
77 | * If this <code>Throwable</code> object was created with a non-null detail | |
78 | * message string, then the result is the concatenation of five strings: | |
79 | * <ul> | |
80 | * <li>The name of the actual class of this object | |
81 | * <li>": " (a colon and a space) | |
82 | * <li>The result of the {@link Throwable#getMessage()} method for this object | |
83 | * <li>"\n" (a newline) | |
84 | * <li>A string representation of the {@link #getElement()} method for this object | |
85 | * </ul> | |
86 | * | |
87 | * @return a string representation of this throwable. | |
88 | */ | |
89 | 0 | public final String toString() { |
90 | 0 | return super.toString() + "\n" + getElement().toString(); |
91 | } | |
92 | ||
93 | } |
|