001 /*****************************************************************************
002 * Copyright (C) PicoContainer Organization. All rights reserved. *
003 * ------------------------------------------------------------------------- *
004 * The software in this package is published under the terms of the BSD *
005 * style license a copy of which has been included with this distribution in *
006 * the LICENSE.txt file. *
007 * *
008 * Original code by *
009 *****************************************************************************/
010 package org.picocontainer;
011
012 import java.io.PrintStream;
013 import java.io.PrintWriter;
014
015 /**
016 * Superclass for all Exceptions in PicoContainer. You can use this if you want to catch all exceptions thrown by
017 * PicoContainer. Be aware that some parts of the PicoContainer API will also throw {@link NullPointerException} when
018 * <code>null</code> values are provided for method arguments, and this is not allowed.
019 *
020 * @author Paul Hammant
021 * @author Aslak Hellesøy
022 */
023 public abstract class PicoException extends RuntimeException {
024
025 /**
026 * Construct a new exception with no cause and no detail message. Note modern JVMs may still track the exception
027 * that caused this one.
028 */
029 protected PicoException() {
030 }
031
032 /**
033 * Construct a new exception with no cause and the specified detail message. Note modern JVMs may still track the
034 * exception that caused this one.
035 *
036 * @param message the message detailing the exception.
037 */
038 protected PicoException(final String message) {
039 super(message);
040 }
041
042 /**
043 * Construct a new exception with the specified cause and no detail message.
044 *
045 * @param cause the exception that caused this one.
046 */
047 protected PicoException(final Throwable cause) {
048 super(cause);
049 }
050
051 /**
052 * Construct a new exception with the specified cause and the specified detail message.
053 *
054 * @param message the message detailing the exception.
055 * @param cause the exception that caused this one.
056 */
057 protected PicoException(final String message, final Throwable cause) {
058 super(message,cause);
059 }
060
061 }