001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.wpilibj.command;
006
007/**
008 * This exception will be thrown if a command is used illegally. There are several ways for this to
009 * happen.
010 *
011 * <p>Basically, a command becomes "locked" after it is first started or added to a command group.
012 *
013 * <p>This exception should be thrown if (after a command has been locked) its requirements change,
014 * it is put into multiple command groups, it is started from outside its command group, or it adds
015 * a new child.
016 */
017@SuppressWarnings("serial")
018public class IllegalUseOfCommandException extends RuntimeException {
019  /** Instantiates an {@link IllegalUseOfCommandException}. */
020  public IllegalUseOfCommandException() {}
021
022  /**
023   * Instantiates an {@link IllegalUseOfCommandException} with the given message.
024   *
025   * @param message the message
026   */
027  public IllegalUseOfCommandException(String message) {
028    super(message);
029  }
030}