|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QedeqException | Line # 24 | 6 | 4 | 80% |
0.8
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(5) | |||
Result | |||
0.8
|
org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration1 org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration1 | 1 PASS | |
0.8
|
org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration6 org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration6 | 1 PASS | |
0.8
|
org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration5 org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration5 | 1 PASS | |
0.8
|
org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration2 org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration2 | 1 PASS | |
0.3
|
org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration3 org.qedeq.kernel.bo.service.unicode.GenerateUtf8Test.testGeneration3 | 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.se.common; | |
17 | ||
18 | ||
19 | /** | |
20 | * Base class for all exceptions of this application. | |
21 | * | |
22 | * @author Michael Meyling | |
23 | */ | |
24 | public abstract class QedeqException extends Exception { | |
25 | ||
26 | /** Error code of this Exception. */ | |
27 | private final int errorCode; | |
28 | ||
29 | /** | |
30 | * Constructor. | |
31 | * | |
32 | * @param errorCode Error code of this message. | |
33 | * @param message Error message. | |
34 | * @param cause Detailed exception information. | |
35 | */ | |
36 | 735 | public QedeqException(final int errorCode, final String message, |
37 | final Throwable cause) { | |
38 | 735 | super(message, cause); |
39 | 735 | this.errorCode = errorCode; |
40 | } | |
41 | ||
42 | /** | |
43 | * Constructor. | |
44 | * | |
45 | * @param errorCode Error code of this message. | |
46 | * @param message Error message. | |
47 | */ | |
48 | 67377 | public QedeqException(final int errorCode, final String message) { |
49 | 67377 | super(message); |
50 | 67377 | this.errorCode = errorCode; |
51 | } | |
52 | ||
53 | /** | |
54 | * Get error code. | |
55 | * | |
56 | * @return Error code. | |
57 | */ | |
58 | 457902 | public int getErrorCode() { |
59 | 457902 | return errorCode; |
60 | } | |
61 | ||
62 | 0 | public String toString() { |
63 | 0 | return getErrorCode() + ": " + getMessage(); |
64 | } | |
65 | ||
66 | } |
|