001    /*----------------------------------------------------------------------------*/
002    /* Copyright (c) FIRST 2008-2012. All Rights Reserved.                        */
003    /* Open Source Software - may be modified and shared by FRC teams. The code   */
004    /* must be accompanied by the FIRST BSD license file in the root directory of */
005    /* the project.                                                               */
006    /*----------------------------------------------------------------------------*/
007    
008    package edu.wpi.first.wpilibj.command;
009    
010    /**
011     * This exception will be thrown if a command is used illegally.  There are
012     * several ways for this to happen.
013     * 
014     * <p>Basically, a command becomes "locked" after it is first started or added
015     * to a command group.</p>
016     *
017     * <p>This exception should be thrown if (after a command has been locked) its requirements
018     * change, it is put into multiple command groups,
019     * it is started from outside its command group, or it adds a new child.</p>
020     *
021     * @author Joe Grinstead
022     */
023    public class IllegalUseOfCommandException extends RuntimeException {
024    
025        /**
026         * Instantiates an {@link IllegalUseOfCommandException}.
027         */
028        public IllegalUseOfCommandException() {
029        }
030    
031        /**
032         * Instantiates an {@link IllegalUseOfCommandException} with the given message.
033         * @param message the message
034         */
035        public IllegalUseOfCommandException(String message) {
036            super(message);
037        }
038    }