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.util; 009 010 011/** 012 * Thrown if there is an error caused by a basic system or setting not being properly initialized 013 * before being used. 014 */ 015public class BaseSystemNotInitializedException extends RuntimeException { 016 /** 017 * Create a new BaseSystemNotInitializedException. 018 * 019 * @param message the message to attach to the exception 020 */ 021 public BaseSystemNotInitializedException(String message) { 022 super(message); 023 } 024 025 /** 026 * Create a new BaseSystemNotInitializedException using the offending class that was not set and 027 * the class that was affected. 028 * 029 * @param offender The class or interface that was not properly initialized. 030 * @param affected The class that was was affected by this missing initialization. 031 */ 032 public BaseSystemNotInitializedException(Class<?> offender, Class<?> affected) { 033 super("The " + offender.getSimpleName() + " for the " + affected.getSimpleName() 034 + " was never set."); 035 } 036}