37 #include <pcl/pcl_config.h>
40 #ifndef __OPENNI_EXCEPTION__
41 #define __OPENNI_EXCEPTION__
51 #if defined _WIN32 && defined _MSC_VER && !defined __PRETTY_FUNCTION__
52 #define __PRETTY_FUNCTION__ __FUNCTION__
56 #define THROW_OPENNI_EXCEPTION(format,...) throwOpenNIException( __PRETTY_FUNCTION__, __FILE__, __LINE__, format , ##__VA_ARGS__ )
59 namespace openni_wrapper
79 OpenNIException (
const std::string& function_name,
const std::string& file_name,
unsigned line_number,
const std::string& message)
throw ();
97 virtual const char*
what ()
const throw ();
130 throwOpenNIException (
const char* function_name,
const char* file_name,
unsigned line_number,
const char* format, ...)
132 static char msg[1024];
134 va_start (args, format);
135 vsprintf (msg, format, args);
virtual const char * what() const
virtual method, derived from std::exception
OpenNIException(const std::string &function_name, const std::string &file_name, unsigned line_number, const std::string &message)
Constructor.
void throwOpenNIException(const char *function_name, const char *file_name, unsigned line_number, const char *format,...)
inline function used by the macro THROW_OPENNI_EXCEPTION to create an instance of OpenNIException wit...
const std::string & getFileName() const
const std::string & getFunctionName() const
unsigned getLineNumber() const
OpenNIException & operator=(const OpenNIException &exception)
Assignment operator to allow copying the message of another exception variable.
virtual ~OpenNIException()
virtual Destructor that never throws an exception
std::string message_long_
std::string function_name_