42 #include <boost/current_function.hpp>
49 #define PCL_THROW_EXCEPTION(ExceptionName, message) \
51 std::ostringstream s; \
53 throw ExceptionName(s.str(), __FILE__, BOOST_CURRENT_FUNCTION, __LINE__); \
68 const char* file_name =
nullptr,
69 const char* function_name =
nullptr,
70 unsigned line_number = 0)
108 const char* file_name,
109 const char* function_name,
110 unsigned line_number)
112 std::ostringstream sstream;
113 if (function_name !=
nullptr)
114 sstream << function_name <<
" ";
116 if (file_name !=
nullptr)
118 sstream <<
"in " << file_name <<
" ";
119 if (line_number != 0)
120 sstream <<
"@ " << line_number <<
" ";
122 sstream <<
": " << error_description;
124 return (sstream.str ());
140 const char* file_name =
nullptr,
141 const char* function_name =
nullptr,
142 unsigned line_number = 0)
143 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
154 const char* file_name =
nullptr,
155 const char* function_name =
nullptr,
156 unsigned line_number = 0)
157 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
169 const char* file_name =
nullptr,
170 const char* function_name =
nullptr,
171 unsigned line_number = 0)
172 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
183 const char* file_name =
nullptr,
184 const char* function_name =
nullptr,
185 unsigned line_number = 0)
186 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
197 const char* file_name =
nullptr,
198 const char* function_name =
nullptr,
199 unsigned line_number = 0)
200 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
212 const char* file_name =
nullptr,
213 const char* function_name =
nullptr,
214 unsigned line_number = 0)
215 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
226 const char* file_name =
nullptr,
227 const char* function_name =
nullptr,
228 unsigned line_number = 0)
229 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
236 const char* file_name =
nullptr,
237 const char* function_name =
nullptr,
238 unsigned line_number = 0)
239 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
246 const char* file_name =
nullptr,
247 const char* function_name =
nullptr,
248 unsigned line_number = 0)
249 :
pcl::
PCLException (error_description, file_name, function_name, line_number) { }
259 const char* file_name =
nullptr,
260 const char* function_name =
nullptr,
261 unsigned line_number = 0)
262 :
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)