37 #ifndef __OPENNI2_EXCEPTION__ 38 #define __OPENNI2_EXCEPTION__ 45 #if defined _WIN32 && defined _MSC_VER 46 # define __PRETTY_FUNCTION__ __FUNCTION__ 48 #define THROW_OPENNI_EXCEPTION(format,...) throwOpenNIException( __PRETTY_FUNCTION__, __FILE__, __LINE__, format , ##__VA_ARGS__ ) 61 const std::string& file_name,
63 const std::string& message)
throw ();
67 virtual const char*
what()
const throw ();
81 inline void throwOpenNIException(
const char*
function,
const char* file,
unsigned line,
const char* format, ...)
83 static char msg[1024];
85 va_start(args, format);
86 vsprintf(msg, format, args);
unsigned getLineNumber() const
std::string function_name_
virtual ~OpenNI2Exception()
OpenNI2Exception(const std::string &function_name, const std::string &file_name, unsigned line_number, const std::string &message)
const std::string & getFileName() const
OpenNI2Exception & operator=(const OpenNI2Exception &exception)
void throwOpenNIException(const char *function, const char *file, unsigned line, const char *format,...)
std::string message_long_
virtual const char * what() const
const std::string & getFunctionName() const