001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2008-2017. 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
008package edu.wpi.first.wpilibj.command;
009
010/**
011 * This exception will be thrown if a command is used illegally. There are several ways for this to
012 * happen.
013 *
014 * <p> Basically, a command becomes "locked" after it is first started or added to a command group.
015 * </p>
016 *
017 * <p> This exception should be thrown if (after a command has been locked) its requirements change,
018 * it is put into multiple command groups, it is started from outside its command group, or it adds
019 * a new child. </p>
020 */
021public class IllegalUseOfCommandException extends RuntimeException {
022
023  /**
024   * Instantiates an {@link IllegalUseOfCommandException}.
025   */
026  public IllegalUseOfCommandException() {
027  }
028
029  /**
030   * Instantiates an {@link IllegalUseOfCommandException} with the given message.
031   *
032   * @param message the message
033   */
034  public IllegalUseOfCommandException(String message) {
035    super(message);
036  }
037}