001 package net.sourceforge.mp3dings.export;
002
003 /* Mp3dings - manage mp3 meta-information
004 * Copyright (C) 2003 Moritz Ringler
005 * $Id: ExportException.java 13 2007-07-27 09:52:39Z ringler $
006 *
007 * This program is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU General Public License
009 * as published by the Free Software Foundation; either version 2
010 * of the License, or (at your option) any later version.
011 *
012 * This program 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
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with this program; if not, write to the Free Software
019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020 */
021 import java.io.Serializable;
022
023 /** A common exception type for export errors. */
024 public class ExportException extends Exception implements Serializable {
025 static final long serialVersionUID = 298813829726315182L;
026
027 public ExportException(Throwable cause){
028 super(cause);
029 }
030
031 public ExportException(String message){
032 super(message);
033 }
034
035 public ExportException(String message, Throwable cause){
036 super(message, cause);
037 }
038
039 public String getLocalizedMessage(){
040 if(getCause() != null){
041 return getCause().getLocalizedMessage();
042 } else {
043 return super.getLocalizedMessage();
044 }
045 }
046 }