41 #ifndef CRL_MULTISENSE_EXCEPTION_HH 42 #define CRL_MULTISENSE_EXCEPTION_HH 52 #ifdef CRL_DEBUG_SYSLOG 54 #define CRL_DEBUG_REDIRECTION syslog(LOG_USER|LOG_INFO, 56 #define CRL_DEBUG_REDIRECTION fprintf(stderr, 57 #endif // CRL_DEBUG_SYSLOG 60 #define CRL_FILENAME \ 61 (strrchr(__FILE__,'\\') \ 62 ? strrchr(__FILE__,'\\')+1 \ 65 #define CRL_FILENAME \ 66 (strrchr(__FILE__,'/') \ 67 ? strrchr(__FILE__,'/')+1 \ 71 #define CRL_EXCEPTION(fmt, ...) \ 73 throw crl::multisense::details::utility::Exception("%s(%d): %s: " fmt,CRL_FILENAME,__LINE__, \ 74 CRL_PRETTY_FUNCTION,##__VA_ARGS__); \ 77 #define CRL_DEBUG(fmt, ...) \ 79 double now = crl::multisense::details::utility::TimeStamp::getCurrentTime(); \ 80 CRL_DEBUG_REDIRECTION "[%.3f] %s(%d): %s: " fmt,now,CRL_FILENAME,__LINE__, \ 81 CRL_PRETTY_FUNCTION,##__VA_ARGS__); \ 86 namespace multisense {
98 Exception(
const char *failureReason, ...);
99 Exception(
const std::string& failureReason);
102 virtual const
char*
what() const throw();
Exception(const char *failureReason,...)
virtual const char * what() const