001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) 2008-2018 FIRST. 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 * Instantiates an {@link IllegalUseOfCommandException}. 024 */ 025 public IllegalUseOfCommandException() { 026 } 027 028 /** 029 * Instantiates an {@link IllegalUseOfCommandException} with the given message. 030 * 031 * @param message the message 032 */ 033 public IllegalUseOfCommandException(String message) { 034 super(message); 035 } 036}