38 #ifndef __ASTRA_EXCEPTION__ 39 #define __ASTRA_EXCEPTION__ 46 #if defined _WIN32 && defined _MSC_VER 47 # define __PRETTY_FUNCTION__ __FUNCTION__ 49 #define THROW_OPENNI_EXCEPTION(format,...) throwOpenNIException( __PRETTY_FUNCTION__, __FILE__, __LINE__, format , ##__VA_ARGS__ ) 62 const std::string& file_name,
64 const std::string& message);
68 virtual const char*
what()
const throw();
82 inline void throwOpenNIException(
const char*
function,
const char* file,
unsigned line,
const char* format, ...)
84 static char msg[1024];
86 va_start(args, format);
87 vsprintf(msg, format, args);
unsigned getLineNumber() const
const std::string & getFileName() const
virtual const char * what() const
const std::string & getFunctionName() const
AstraException & operator=(const AstraException &exception)
std::string message_long_
std::string function_name_
AstraException(const std::string &function_name, const std::string &file_name, unsigned line_number, const std::string &message)
void throwOpenNIException(const char *function, const char *file, unsigned line, const char *format,...)
virtual ~AstraException()