Package robocode.exception

Examples of robocode.exception.RobotException


    return res;
  }

  public void checkRunThread() {
    if (Thread.currentThread() != runThread) {
      throw new RobotException("You cannot take action in this thread!");
    }
  }
View Full Code Here


    if (robotProxy == null) {
      syserr.println("RobotProxy is null");
      return null;
    }
    if (!robotProxy.getStatics().isAdvancedRobot()) {
      throw new RobotException("Only advanced robots could create files");
    }
   
    final File dir = robotProxy.getRobotFileSystemManager().getWritableDirectory();

    if (!dir.exists()) {
View Full Code Here

    }

    // Entering tick
    robotThreadManager.checkRunThread();
    if (testingCondition) {
      throw new RobotException(
          "You cannot take action inside Condition.test().  You should handle onCustomEvent instead.");
    }

    setSetCallCount(0);
    setGetCallCount(0);
View Full Code Here

/**
* @author Pavel Savara (original)
*/
public class DieFast extends Robot {
  public void run() {
    throw new RobotException();
  }
View Full Code Here

   */
  static void uninitializedException() {
    StackTraceElement[] trace = Thread.currentThread().getStackTrace();
    String methodName = trace[2].getMethodName();

    throw new RobotException(
        "You cannot call the " + methodName
        + "() method before your run() method is called, or you are using a Robot object that the game doesn't know about.");
  }
View Full Code Here

   * for documentation about this constructor.
   *
   * @see java.io.FileOutputStream#FileOutputStream(FileDescriptor)
   */
  public RobocodeFileOutputStream(FileDescriptor fdObj) {
    throw new RobotException("Creating a RobocodeFileOutputStream with a FileDescriptor is not supported.");
  }
View Full Code Here

    this.fileName = fileName;
   
    final IThreadManagerBase threadManager = ContainerBase.getComponent(IThreadManagerBase.class);

    if (threadManager == null) {
      throw new RobotException("ThreadManager cannot be null!");
    }

    out = threadManager.createRobotFileStream(fileName, append);
  }
View Full Code Here

TOP

Related Classes of robocode.exception.RobotException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.