/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @(#)MessagingException.java 1.10 02/06/13
*/
/**
* The base class for all exceptions thrown by the Messaging classes
*
* @author John Mani
* @author Bill Shannon
*/
/**
* The next exception in the chain.
*
* @serial
*/
/**
* Constructs a MessagingException with no detail message.
*/
public MessagingException() {
super();
}
/**
* Constructs a MessagingException with the specified detail message.
* @param s the detail message
*/
super(s);
}
/**
* Constructs a MessagingException with the specified
* Exception and detail message. The specified exception is chained
* to this exception.
* @param s the detail message
* @param e the embedded exception
* @see #getNextException
* @see #setNextException
*/
super(s);
next = e;
}
/**
* Get the next exception chained to this one. If the
* next exception is a MessagingException, the chain
* may extend further.
*
* @return next Exception, null if none.
*/
return next;
}
/**
* Add an exception to the end of the chain. If the end
* is <strong>not</strong> a MessagingException, this
* exception cannot be added to the end.
*
* @param ex the new end of the Exception chain
* @return <code>true</code> if the this Exception
* was added, <code>false</code> otherwise.
*/
while (theEnd instanceof MessagingException &&
}
// If the end is a MessagingException, we can add this
// exception to the chain.
if (theEnd instanceof MessagingException) {
return true;
} else
return false;
}
/**
* Produce the message, include the message from the nested
* exception if there is one.
*/
return super.getMessage();
String s = super.getMessage();
while (n != null) {
if (n instanceof MessagingException) {
}
} else {
n = null;
}
}
}
return super.getMessage();
}
}