12 #ifndef __LIDAR_ERROR_H__ 13 #define __LIDAR_ERROR_H__ 18 LT_BEGIN_LIDAR_NAMESPACE
21 #define THROW_LIBRARY_ERROR(code) \ 22 throw Error(__FILE__, __FUNCTION__, __LINE__, code) 25 #define THROW_OS_ERROR() \ 26 throw OSError(__FILE__, __FUNCTION__, __LINE__) 31 class Error :
public std::exception
46 Error(
const char *file,
const char *func,
int line,
int code)
throw();
53 const char *
filename(
void)
const throw();
59 const char *
function(void)
const throw();
65 int line(
void)
const throw();
71 int error(
void)
const throw();
78 const char *
what(
void)
const throw();
116 OSError(
const char *file,
const char *func,
int line)
throw();
119 LT_END_LIDAR_NAMESPACE
120 #endif // __LIDAR_ERROR_H__ OSError extends Error by using errno or GetLastError() to build the text description of the error...
int line(void) const
Get the line number.
Error is the base class for all LiDAR SDK errors.
const char * filename(void) const
Get the file name.
Error & operator()(const char *fmt,...)
Append more text the error discription.
const char * what(void) const
Get the text description.
int error(void) const
Get the error code.