42 #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__); \
70 const char* file_name =
nullptr,
71 const char* function_name =
nullptr,
72 unsigned line_number = 0)
110 const char* file_name,
111 const char* function_name,
112 unsigned line_number)
114 std::ostringstream sstream;
115 if (function_name !=
nullptr)
116 sstream << function_name <<
" ";
118 if (file_name !=
nullptr)
120 sstream <<
"in " << file_name <<
" ";
121 if (line_number != 0)
122 sstream <<
"@ " << line_number <<
" ";
124 sstream <<
": " << error_description;
126 return (sstream.str ());
142 const char* file_name =
nullptr,
143 const char* function_name =
nullptr,
144 unsigned line_number = 0)
145 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
156 const char* file_name =
nullptr,
157 const char* function_name =
nullptr,
158 unsigned line_number = 0)
159 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
171 const char* file_name =
nullptr,
172 const char* function_name =
nullptr,
173 unsigned line_number = 0)
174 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
185 const char* file_name =
nullptr,
186 const char* function_name =
nullptr,
187 unsigned line_number = 0)
188 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
199 const char* file_name =
nullptr,
200 const char* function_name =
nullptr,
201 unsigned line_number = 0)
202 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
214 const char* file_name =
nullptr,
215 const char* function_name =
nullptr,
216 unsigned line_number = 0)
217 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
228 const char* file_name =
nullptr,
229 const char* function_name =
nullptr,
230 unsigned line_number = 0)
231 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
238 const char* file_name =
nullptr,
239 const char* function_name =
nullptr,
240 unsigned line_number = 0)
241 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
248 const char* file_name =
nullptr,
249 const char* function_name =
nullptr,
250 unsigned line_number = 0)
251 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
261 const char* file_name =
nullptr,
262 const char* function_name =
nullptr,
263 unsigned line_number = 0)
264 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
An exception that is thrown when the arguments number or type is wrong/unhandled.
BadArgumentException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
ComputeFailedException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception that is thrown during an IO error (typical read/write errors)
IOException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception thrown when init can not be performed should be used in all the PCLBase class inheritant...
InitFailedException(const std::string &error_description="", const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception that is thrown when a PCLPointCloud2 message cannot be converted into a PCL type.
InvalidConversionException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, 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 char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception that is thrown when a PointCloud is not dense but is attempted to be used as dense.
IsNotDenseException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception that is thrown when the kernel size is too small.
KernelWidthTooSmallException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
A base class for all pcl exceptions which inherits from std::runtime_error.
const char * detailedMessage() const noexcept
const char * getFileName() const noexcept
PCLException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
static std::string createDetailedMessage(const std::string &error_description, const char *file_name, const char *function_name, unsigned line_number)
const char * getFunctionName() const noexcept
const char * function_name_
unsigned getLineNumber() const noexcept
UnhandledPointTypeException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)
An exception that is thrown when an organized point cloud is needed but not provided.
UnorganizedPointCloudException(const std::string &error_description, const char *file_name=nullptr, const char *function_name=nullptr, unsigned line_number=0)