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; \
55 throw ExceptionName(s.str(), __FILE__, BOOST_CURRENT_FUNCTION, __LINE__); \
70 const std::string& file_name =
"",
71 const std::string& function_name =
"" ,
72 unsigned line_number = 0) throw ()
73 :
std::runtime_error (error_description)
106 std::stringstream sstream;
116 sstream <<
": " <<
what ();
118 return (sstream.str ());
142 const std::string& file_name =
"",
143 const std::string& function_name =
"" ,
144 unsigned line_number = 0) throw ()
145 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
156 const std::string& file_name =
"",
157 const std::string& function_name =
"" ,
158 unsigned line_number = 0) throw ()
159 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
171 const std::string& file_name =
"",
172 const std::string& function_name =
"" ,
173 unsigned line_number = 0) throw ()
174 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
185 const std::string& file_name =
"",
186 const std::string& function_name =
"" ,
187 unsigned line_number = 0) throw ()
188 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
199 const std::string& file_name =
"",
200 const std::string& function_name =
"" ,
201 unsigned line_number = 0) throw ()
202 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
214 const std::string& file_name =
"",
215 const std::string& function_name =
"" ,
216 unsigned line_number = 0) throw ()
217 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
228 const std::string& file_name =
"",
229 const std::string& function_name =
"" ,
230 unsigned line_number = 0) throw ()
231 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
238 const std::string& file_name =
"",
239 const std::string& function_name =
"" ,
240 unsigned line_number = 0) throw ()
241 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
248 const std::string& file_name =
"",
249 const std::string& function_name =
"" ,
250 unsigned line_number = 0) throw ()
251 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
ComputeFailedException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
KernelWidthTooSmallException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
InitFailedException(const std::string &error_description="", const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
IsNotDenseException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
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 std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
const std::string & getFunctionName() const
An exception that is thrown when an organized point cloud is needed but not provided.
An exception thrown when init can not be performed should be used in all the PCLBase class inheritant...
unsigned getLineNumber() const
IOException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
InvalidConversionException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
An exception that is thrown when a PCLPointCloud2 message cannot be converted into a PCL type...
An exception that is thrown when a PointCloud is not dense but is attemped to be used as dense...
std::string detailedMessage() const
An exception that is thrown when the kernel size is too small.
char const * what() const
A base class for all pcl exceptions which inherits from std::runtime_error.
An exception that is thrown during an IO error (typical read/write errors)
UnhandledPointTypeException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
std::string function_name_
UnorganizedPointCloudException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)
const std::string & getFileName() const
PCLException(const std::string &error_description, const std::string &file_name="", const std::string &function_name="", unsigned line_number=0)