class _NullPointerException : public E2Exception { public: _NullPointerException(const string& file = "unknown", int line = 0, const string& desc_str = "") : E2Exception(file, line, desc_str) {} const char *name() const{ return "NullPointerException"; } }; #define NullPointerException(desc) _NullPointerException(__FILE__,\ __LINE__,desc)