2004-04-09 13:05:39 +00:00
|
|
|
/* ====================================================================
|
2006-12-22 19:18:16 +00:00
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
2004-04-09 13:05:39 +00:00
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
==================================================================== */
|
|
|
|
|
|
2002-02-14 04:00:59 +00:00
|
|
|
package org.apache.poi.hpsf;
|
|
|
|
|
|
|
|
|
|
/**
|
2006-03-03 16:57:55 +00:00
|
|
|
* <p>This exception is the superclass of all other checked exceptions thrown
|
|
|
|
|
* in this package. It supports a nested "reason" throwable, i.e. an exception
|
|
|
|
|
* that caused this one to be thrown.</p>
|
|
|
|
|
*
|
2003-08-30 09:13:53 +00:00
|
|
|
* @author Rainer Klute <a
|
2006-03-03 16:57:55 +00:00
|
|
|
* href="mailto:klute@rainer-klute.de"><klute@rainer-klute.de></a>
|
2003-02-01 13:28:28 +00:00
|
|
|
* @version $Id$
|
|
|
|
|
* @since 2002-02-09
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public class HPSFException extends Exception
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
|
2003-08-02 19:02:28 +00:00
|
|
|
/**
|
|
|
|
|
* <p>The underlying reason for this exception - may be
|
|
|
|
|
* <code>null</code>.</p>
|
|
|
|
|
* */
|
2002-02-14 04:00:59 +00:00
|
|
|
private Throwable reason;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-08-02 19:02:28 +00:00
|
|
|
* <p>Creates an {@link HPSFException}.</p>
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public HPSFException()
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
super();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-08-02 19:02:28 +00:00
|
|
|
* <p>Creates an {@link HPSFException} with a message string.</p>
|
2002-05-11 14:47:24 +00:00
|
|
|
*
|
2003-02-01 13:28:28 +00:00
|
|
|
* @param msg The message string.
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public HPSFException(final String msg)
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
super(msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-02-01 13:28:28 +00:00
|
|
|
* <p>Creates a new {@link HPSFException} with a reason.</p>
|
2002-05-11 14:47:24 +00:00
|
|
|
*
|
2003-02-01 13:28:28 +00:00
|
|
|
* @param reason The reason, i.e. a throwable that indirectly
|
|
|
|
|
* caused this exception.
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public HPSFException(final Throwable reason)
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
super();
|
|
|
|
|
this.reason = reason;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-08-02 19:02:28 +00:00
|
|
|
* <p>Creates an {@link HPSFException} with a message string and a
|
|
|
|
|
* reason.</p>
|
2002-05-11 14:47:24 +00:00
|
|
|
*
|
2003-02-01 13:28:28 +00:00
|
|
|
* @param msg The message string.
|
|
|
|
|
* @param reason The reason, i.e. a throwable that indirectly
|
|
|
|
|
* caused this exception.
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public HPSFException(final String msg, final Throwable reason)
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
super(msg);
|
|
|
|
|
this.reason = reason;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-02-01 13:28:28 +00:00
|
|
|
* <p>Returns the {@link Throwable} that caused this exception to
|
|
|
|
|
* be thrown or <code>null</code> if there was no such {@link
|
|
|
|
|
* Throwable}.</p>
|
2002-05-11 14:47:24 +00:00
|
|
|
*
|
2003-02-01 13:28:28 +00:00
|
|
|
* @return The reason
|
2002-02-14 04:00:59 +00:00
|
|
|
*/
|
2003-02-01 13:28:28 +00:00
|
|
|
public Throwable getReason()
|
|
|
|
|
{
|
2002-02-14 04:00:59 +00:00
|
|
|
return reason;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|