|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LogicalCheckException | Line # 27 | 8 | 6 | 60% |
0.6
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(23) | |||
Result | |||
0.4
|
org.qedeq.kernel.bo.service.logic.FormalProofCheckerPluginTest.testPlugin2 org.qedeq.kernel.bo.service.logic.FormalProofCheckerPluginTest.testPlugin2 | 1 PASS | |
0.4
|
org.qedeq.kernel.bo.service.logic.FormalProofCheckerPluginTest.testPlugin3 org.qedeq.kernel.bo.service.logic.FormalProofCheckerPluginTest.testPlugin3 | 1 PASS | |
0.4
|
org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck6 org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck6 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerTest.testCheckModule org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerTest.testCheckModule | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative04 org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative04 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPlugin org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPlugin | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPluginFast org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPluginFast | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative02 org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative02 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck4 org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck4 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative03 org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative03 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative06 | 1 PASS | |
0.2
|
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse2 org.qedeq.kernel.xml.parser.CharsetParserTest.testParse2 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative04 org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative04 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPlugin2 org.qedeq.kernel.bo.service.logic.SimpleProofFinderPluginTest.testPlugin2 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative02 org.qedeq.kernel.bo.service.logic.QedeqBoFormalLogicCheckerDirectTest.testNegative02 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck1 org.qedeq.kernel.bo.logic.proof.checker.ProofCheckerTest.testCheck1 | 1 PASS | |
0.2
|
org.qedeq.kernel.xml.parser.CharsetParserTest.testParse1 org.qedeq.kernel.xml.parser.CharsetParserTest.testParse1 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative07 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegative05 | 1 PASS | |
0.2
|
org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative03 org.qedeq.kernel.bo.logic.wf.FormulaCheckerContextTest.testNegative03 | 1 PASS | |
1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
2 | * | |
3 | * Copyright 2000-2013, 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.common; | |
17 | ||
18 | import org.qedeq.kernel.se.base.list.Element; | |
19 | import org.qedeq.kernel.se.common.ModuleContext; | |
20 | import org.qedeq.kernel.se.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 | 12 | public LogicalCheckException(final int errorCode, final String message, final Element element, |
44 | final ModuleContext context, final ModuleContext referenceContext) { | |
45 | 12 | super(errorCode, message, context, referenceContext); |
46 | 12 | 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 | 136 | public LogicalCheckException(final int errorCode, final String message, |
58 | final Element element, final ModuleContext context) { | |
59 | 136 | super(errorCode, message, context); |
60 | 136 | this.element = element; |
61 | } | |
62 | ||
63 | /** | |
64 | * Constructs an exception. | |
65 | * | |
66 | * @param errorCode ErrorCode of this message. | |
67 | * @param message What is the problem. | |
68 | * @param context Error location. | |
69 | */ | |
70 | 77 | public LogicalCheckException(final int errorCode, final String message, |
71 | final ModuleContext context) { | |
72 | 77 | super(errorCode, message, context); |
73 | 77 | this.element = null; |
74 | } | |
75 | ||
76 | /** | |
77 | * Get the problematic element. Might be <code>null</code>. | |
78 | * | |
79 | * @return Element. | |
80 | */ | |
81 | 0 | public final Element getElement() { |
82 | 0 | return this.element; |
83 | } | |
84 | ||
85 | /** | |
86 | * Returns a short description of this throwable. | |
87 | * If this <code>Throwable</code> object was created with a non-null detail | |
88 | * message string, then the result is the concatenation of five strings: | |
89 | * <ul> | |
90 | * <li>The name of the actual class of this object | |
91 | * <li>": " (a colon and a space) | |
92 | * <li>The result of the {@link Throwable#getMessage()} method for this object | |
93 | * <li>"\n" (a newline) | |
94 | * <li>A string representation of the {@link #getElement()} method for this object | |
95 | * (might be empty). | |
96 | * </ul> | |
97 | * | |
98 | * @return a string representation of this throwable. | |
99 | */ | |
100 | 0 | public final String toString() { |
101 | 0 | return super.toString() + "\n" |
102 | 0 | + (getElement() != null ? getElement().toString() : ""); |
103 | } | |
104 | ||
105 | } |
|