EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.se.common]

COVERAGE SUMMARY FOR SOURCE FILE [QedeqException.java]

nameclass, %method, %block, %line, %
QedeqException.java100% (1/1)75%  (3/4)58%  (18/31)88%  (7/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class QedeqException100% (1/1)75%  (3/4)58%  (18/31)88%  (7/8)
toString (): String 0%   (0/1)0%   (0/13)0%   (0/1)
QedeqException (int, String): void 100% (1/1)100% (7/7)100% (3/3)
QedeqException (int, String, Throwable): void 100% (1/1)100% (8/8)100% (3/3)
getErrorCode (): int 100% (1/1)100% (3/3)100% (1/1)

1/* This file is part of the project "Hilbert II" - http://www.qedeq.org
2 *
3 * Copyright 2000-2014,  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 
16package org.qedeq.kernel.se.common;
17 
18 
19/**
20 * Base class for all exceptions of this application.
21 *
22 * @author  Michael Meyling
23 */
24public 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    public QedeqException(final int errorCode, final String message,
37            final Throwable cause) {
38        super(message, cause);
39        this.errorCode = errorCode;
40    }
41 
42    /**
43     * Constructor.
44     *
45     * @param   errorCode   Error code of this message.
46     * @param   message     Error message.
47     */
48    public QedeqException(final int errorCode, final String message) {
49        super(message);
50        this.errorCode = errorCode;
51    }
52 
53    /**
54     * Get error code.
55     *
56     * @return  Error code.
57     */
58    public int getErrorCode() {
59        return errorCode;
60    }
61 
62    public String toString() {
63        return getErrorCode() + ": " + getMessage();
64    }
65 
66}

[all classes][org.qedeq.kernel.se.common]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov