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     * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant   *
009     *****************************************************************************/
010    
011    package org.picocontainer;
012    
013    /**
014     * Subclass of {@link PicoException} that is thrown when there is:
015     *   - a problem initializing the container
016     *   - a cyclic dependency between components occurs.
017     *   - problem adding a component
018     *   - a request for a component that is ambiguous.
019     *
020     */
021    @SuppressWarnings("serial")
022    public class PicoCompositionException extends PicoException {
023        /**
024         * Construct a new exception with no cause and the specified detail message.  Note modern JVMs may still track the
025         * exception that caused this one.
026         *
027         * @param message the message detailing the exception.
028         */
029        public PicoCompositionException(final String message) {
030            super(message);
031        }
032    
033        /**
034         * Construct a new exception with the specified cause and no detail message.
035         * 
036         * @param cause the exception that caused this one.
037         */
038        public PicoCompositionException(final Throwable cause) {
039            super(cause);
040        }
041    
042        /**
043         * Construct a new exception with the specified cause and the specified detail message.
044         *
045         * @param message the message detailing the exception.
046         * @param cause   the exception that caused this one.
047         */
048        public PicoCompositionException(final String message, final Throwable cause) {
049            super(message, cause);
050        }
051    }