37 #ifndef PCL_EXCEPTIONS_H_ 38 #define PCL_EXCEPTIONS_H_ 42 #include <pcl/pcl_macros.h> 43 #include <boost/current_function.hpp> 50 #define PCL_THROW_EXCEPTION(ExceptionName, message) \ 52 std::ostringstream s; \ 54 throw ExceptionName(s.str(), __FILE__, BOOST_CURRENT_FUNCTION, __LINE__); \ 69 const char* file_name = NULL,
70 const char* function_name = NULL,
71 unsigned line_number = 0)
109 const char* file_name,
110 const char* function_name,
111 unsigned line_number)
113 std::ostringstream sstream;
114 if (function_name != NULL)
115 sstream << function_name <<
" ";
117 if (file_name != NULL)
119 sstream <<
"in " << file_name <<
" ";
120 if (line_number != 0)
121 sstream <<
"@ " << line_number <<
" ";
123 sstream <<
": " << error_description;
125 return (sstream.str ());
141 const char* file_name = NULL,
142 const char* function_name = NULL,
143 unsigned line_number = 0)
144 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
155 const char* file_name = NULL,
156 const char* function_name = NULL,
157 unsigned line_number = 0)
158 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
170 const char* file_name = NULL,
171 const char* function_name = NULL,
172 unsigned line_number = 0)
173 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
184 const char* file_name = NULL,
185 const char* function_name = NULL,
186 unsigned line_number = 0)
187 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
198 const char* file_name = NULL,
199 const char* function_name = NULL,
200 unsigned line_number = 0)
201 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
213 const char* file_name = NULL,
214 const char* function_name = NULL,
215 unsigned line_number = 0)
216 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
227 const char* file_name = NULL,
228 const char* function_name = NULL,
229 unsigned line_number = 0)
230 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
237 const char* file_name = NULL,
238 const char* function_name = NULL,
239 unsigned line_number = 0)
240 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
247 const char* file_name = NULL,
248 const char* function_name = NULL,
249 unsigned line_number = 0)
250 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
260 const char* file_name = NULL,
261 const char* function_name = NULL,
262 unsigned line_number = 0)
263 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
IsNotDenseException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
const char * getFileName() const
An exception that is thrown when a sample consensus model doesn't have the correct number of samples ...
InvalidSACModelTypeException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
const char * getFunctionName() const
An exception that is thrown when a PointCloud is not dense but is attemped to be used as dense...
A base class for all pcl exceptions which inherits from std::runtime_error.
KernelWidthTooSmallException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
InitFailedException(const std::string &error_description="", const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
An exception that is thrown when the argments number or type is wrong/unhandled.
static std::string createDetailedMessage(const std::string &error_description, const char *file_name, const char *function_name, unsigned line_number)
IOException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
const char * detailedMessage() const
An exception that is thrown when the kernel size is too small.
const char * function_name_
InvalidConversionException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
An exception thrown when init can not be performed should be used in all the PCLBase class inheritant...
An exception that is thrown during an IO error (typical read/write errors)
UnorganizedPointCloudException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
PCLException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
ComputeFailedException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
An exception that is thrown when an organized point cloud is needed but not provided.
An exception that is thrown when a PCLPointCloud2 message cannot be converted into a PCL type...
unsigned getLineNumber() const
UnhandledPointTypeException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)
BadArgumentException(const std::string &error_description, const char *file_name=NULL, const char *function_name=NULL, unsigned line_number=0)