001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2008-2014. 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/*----------------------------------------------------------------------------*/
007package edu.wpi.first.wpilibj.util;
008
009
010/**
011 * Thrown if there is an error caused by a basic system or setting
012 * not being properly initialized before being used.
013 * 
014 * @author Jonathan Leitschuh
015 */
016public class BaseSystemNotInitializedException extends RuntimeException {
017         /**
018     * Create a new BaseSystemNotInitializedException
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 the
027         * class that was affected.
028         * @param offender The class or interface that was not properly initialized.
029         * @param affected The class that was was affected by this missing initialization.
030         */
031        public BaseSystemNotInitializedException(Class<?> offender, Class<?> affected){
032                super("The " + offender.getSimpleName() + " for the " + affected.getSimpleName() + " was never set.");
033        }
034        
035}