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 /**
013 * Superclass for all Exceptions in PicoContainer. You can use this if you want to catch all exceptions thrown by
014 * PicoContainer. Be aware that some parts of the PicoContainer API will also throw {@link NullPointerException} when
015 * <code>null</code> values are provided for method arguments, and this is not allowed.
016 *
017 * @author Paul Hammant
018 * @author Aslak Hellesøy
019 */
020 public abstract class PicoException extends RuntimeException {
021
022 /**
023 * Construct a new exception with no cause and no detail message. Note modern JVMs may still track the exception
024 * that caused this one.
025 */
026 protected PicoException() {
027 }
028
029 /**
030 * Construct a new exception with no cause and the specified detail message. Note modern JVMs may still track the
031 * exception that caused this one.
032 *
033 * @param message the message detailing the exception.
034 */
035 protected PicoException(final String message) {
036 super(message);
037 }
038
039 /**
040 * Construct a new exception with the specified cause and no detail message.
041 *
042 * @param cause the exception that caused this one.
043 */
044 protected PicoException(final Throwable cause) {
045 super(cause);
046 }
047
048 /**
049 * Construct a new exception with the specified cause and the specified detail message.
050 *
051 * @param message the message detailing the exception.
052 * @param cause the exception that caused this one.
053 */
054 protected PicoException(final String message, final Throwable cause) {
055 super(message,cause);
056 }
057
058 }