Path: blob/main/src/lwjgl/java/javazoom/jl/decoder/JavaLayerException.java
8650 views
/*1* 11/19/04 1.0 moved to LGPL.2* 12/12/99 Initial version. [email protected]3*-----------------------------------------------------------------------4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU Library General Public License as published6* by the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU Library General Public License for more details.13*14* You should have received a copy of the GNU Library General Public15* License along with this program; if not, write to the Free Software16* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.17*----------------------------------------------------------------------18*/1920package javazoom.jl.decoder;2122import java.io.PrintStream;232425/**26* The JavaLayerException is the base class for all API-level27* exceptions thrown by JavaLayer. To facilitate conversion and28* common handling of exceptions from other domains, the class29* can delegate some functionality to a contained Throwable instance.30* <p>31*32* @author MDM33*/34public class JavaLayerException extends Exception35{3637private Throwable exception;383940public JavaLayerException()41{42}4344public JavaLayerException(String msg)45{46super(msg);47}4849public JavaLayerException(String msg, Throwable t)50{51super(msg);52exception = t;53}5455public Throwable getException()56{57return exception;58}596061public void printStackTrace()62{63printStackTrace(System.err);64}6566public void printStackTrace(PrintStream ps)67{68if (this.exception==null)69{70super.printStackTrace(ps);71}72else73{74exception.printStackTrace();75}76}77}787980