Ravelin
NullPointerException.h
1 /****************************************************************************
2  * Copyright 2009 Evan Drumwright
3  * This library is distributed under the terms of the Apache V2.0
4  * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
5  ****************************************************************************/
6 
7 #ifndef _NULL_POINTER_EXCEPTION_H_
8 #define _NULL_POINTER_EXCEPTION_H_
9 
10 #include <stdexcept>
11 
12 namespace Ravelin {
13 
15 class NullPointerException : public std::runtime_error
16 {
17  public:
18  NullPointerException() : std::runtime_error("Pointer is not set") {}
19  NullPointerException(const char* error) : std::runtime_error(error) {}
20 }; // end class
21 
22 
23 } // end namespace
24 
25 #endif
26 
Exception thrown when a pointer should be set but is not.
Definition: NullPointerException.h:15