8#ifndef __LIDAR_ERROR_H__
9#define __LIDAR_ERROR_H__
14LT_BEGIN_LIDAR_NAMESPACE
17#define THROW_LIBRARY_ERROR(code) \
18 throw LizardTech::Error(__FILE__, __FUNCTION__, __LINE__, code)
21#define THROW_OS_ERROR() \
22 throw LizardTech::OSError(__FILE__, __FUNCTION__, __LINE__)
27class Error :
public std::exception
42 Error(
const char *file,
const char *func,
int line,
int code)
throw();
61 int line(
void)
const throw();
74 const char *
what(
void)
const throw();
115LT_END_LIDAR_NAMESPACE
Error is the base class for all LiDAR SDK errors.
const char * filename(void) const
Get the file name.
int error(void) const
Get the error code.
const char * what(void) const
Get the text description.
Error(const char *file, const char *func, int line, int code)
Construct an error exception.
const char * function(void) const
Get the function name.
int line(void) const
Get the line number.
Error & operator()(const char *fmt,...)
Append more text the error discription.
OSError extends Error by using errno or GetLastError() to build the text description of the error.
OSError(const char *file, const char *func, int line)
Construct an OS error exception.