001    /*
002     * XMLDecoderExceptionListener.java
003     *
004     * Created on August 5, 2005, 4:10 PM
005     *
006     * This file is part of the STAR Scheduler.
007     * Copyright (c) 2003-2006 STAR Collaboration - Brookhaven National Laboratory
008     *
009     * STAR Scheduler is free software; you can redistribute it and/or modify
010     * it under the terms of the GNU General Public License as published by
011     * the Free Software Foundation; either version 2 of the License, or
012     * (at your option) any later version.
013     *
014     * STAR Scheduler is distributed in the hope that it will be useful,
015     * but WITHOUT ANY WARRANTY; without even the implied warranty of
016     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017     * GNU General Public License for more details.
018     *
019     * You should have received a copy of the GNU General Public License
020     * along with STAR Scheduler; if not, write to the Free Software
021     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
022     */
023    package gov.bnl.star.offline.scheduler.util.persistent;
024    
025    import java.beans.ExceptionListener;
026    
027    /**
028     * Used to flush more data about exceptions to the screen then is normally present during the serializing  or de-serializing of object to JAVA serialized xml.
029     * @author  Levente Hajdu
030     */
031    public class XMLDecoderExceptionListener extends Object implements ExceptionListener {
032        
033        /** Creates a new instance of XMLDecoderExceptionListener */
034        public XMLDecoderExceptionListener() {
035        }
036        
037        public void exceptionThrown(Exception e) {
038            System.out.println("SUMS session encountered an error during xml deserialization:\n" + e.getMessage() + "\n");
039            e.printStackTrace();
040            
041        }
042        
043    }