PageRenderTime 101ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/src/mpv5/bugtracker/ExceptionHandler.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 48 lines | 15 code | 4 blank | 29 comment | 0 complexity | d4be389eb6ca16f37c18e1d4996de1bf MD5 | raw file
 1/*
 2 *  This file is part of YaBS.
 3 *
 4 *      YaBS is free software: you can redistribute it and/or modify
 5 *      it under the terms of the GNU General Public License as published by
 6 *      the Free Software Foundation, either version 3 of the License, or
 7 *      (at your option) any later version.
 8 *
 9 *      YaBS is distributed in the hope that it will be useful,
10 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
11 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 *      GNU General Public License for more details.
13 *
14 *      You should have received a copy of the GNU General Public License
15 *      along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
16 */
17package mpv5.bugtracker;
18
19import java.util.List;
20import java.util.Vector;
21import mpv5.ui.frames.MPView;
22
23/**
24 * This class handles unexpected exceptions thrown during the use of Yabs
25 */
26public class ExceptionHandler {
27
28    /**
29     * Notify the ExceptionHandler about a new Exception
30     * @param exception
31     */
32    public static void add(Exception exception) {
33        exc.add(exception);
34//        mpv5.YabsViewProxy.instance().showError();
35//        mpv5.YabsViewProxy.instance().setWaiting(false);//clean up
36    }
37    static List<Exception> exc = new Vector<Exception>();
38
39    /**
40     * Returns the Excpetions and flushes the list
41     * @return A list of Exceptions
42     */
43    public static List<Exception> getExceptions() {
44        Vector<Exception> t = new Vector<Exception>(exc);
45        exc.clear();
46        return t;
47    }
48}