001/*
002 * $Id: ErrorReporter.java 3166 2009-01-02 13:27:18Z rah003 $
003 *
004 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
005 * Santa Clara, California 95054, U.S.A. All rights reserved.
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 * 
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015 * Lesser General Public License for more details.
016 * 
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this library; if not, write to the Free Software
019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
020 */ 
021
022package org.jdesktop.swingx.error;
023
024/**
025 * <p>ErrorReporter is used by {@link org.jdesktop.swingx.JXErrorPane} to
026 * implement a pluggable error reporting API. For example, a
027 * <code>JXErrorPane</code> may use an <code>EmailErrorReporter</code>, or a 
028 * {@code LogErrorReporter}, or perhaps even an
029 * <code>RSSErrorReporter</code>.</p>
030 *
031 * @status REVIEWED
032 * @author Alexander Zuev
033 * @author rbair
034 */
035public interface ErrorReporter {
036    /**
037     * <p>Reports an error based on the given {@link ErrorInfo}. This
038     * method may be a long running method, and so should not block the EDT in
039     * any way. If an error occurs while reporting the error, it <strong>must not</strong>
040     * throw an exception from this method. If an error dialog causes another error,
041     * it should be silently swallowed. If proper heuristics can be used, an attempt
042     * can be made some time later to re-report failed error reports, but such attempts
043     * should be transparent to the user.</p>
044     *
045     * @param info encapsulates all information to report using this facility. Must not be null.
046     * @exception thrown if the info param is null
047     */
048    public void reportError(ErrorInfo info) throws NullPointerException;
049}