/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://glassfish.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://glassfish.dev.java.net/public/CDDLv1.0.html.
*
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)ObjStoreException.java 1.2 05/02/06
*
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
*/
package com.sun.messaging.jmq.admin.objstore;
/**
* <P>This is the root class of all ObjStore exceptions.
*
* <P>It provides following information:
* <UL>
* <LI> A string describing the error - This string is
* the standard Java exception message, and is available via
* getMessage().
* <LI> A reference to another exception - Often a ObjStore exception will
* be the result of a lower level problem. If appropriate, this
* lower level exception can be linked to the ObjStore exception.
* </UL>
**/
public class ObjStoreException extends Exception {
/**
* Exception reference
**/
private Exception linkedException;
/**
* Constructs an ObjStoreException
*/
public ObjStoreException() {
super();
linkedException = null;
}
/**
* Constructs an ObjStoreException with reason
*
* @param reason a description of the exception
**/
public ObjStoreException(String reason) {
super(reason);
linkedException = null;
}
/**
* Gets the exception linked to this one
*
* @return the linked Exception, null if none
**/
public Exception getLinkedException() {
return (linkedException);
}
/**
* Adds a linked Exception
*
* @param ex the linked Exception
**/
public synchronized void setLinkedException(Exception ex) {
linkedException = ex;
}
}
|