37 #ifndef PCL_EXCEPTIONS_H_
38 #define PCL_EXCEPTIONS_H_
56 const std::string& file_name =
"",
57 const std::string& function_name =
"" ,
58 unsigned line_number = 0) throw ()
59 : std::runtime_error (error_description)
60 , file_name_ (file_name)
61 , function_name_ (function_name)
62 , line_number_ (line_number)
77 return function_name_;
89 std::stringstream sstream;
90 if (function_name_ !=
"")
91 sstream << function_name_ <<
" ";
95 sstream <<
"in " << file_name_ <<
" ";
96 if (line_number_ != 0)
97 sstream <<
"@ " << line_number_ <<
" ";
99 sstream <<
":" << what ();
101 return sstream.str ();
105 std::string file_name_;
106 std::string function_name_;
107 unsigned line_number_;
118 const std::string& file_name =
"",
119 const std::string& function_name =
"" ,
120 unsigned line_number = 0) throw ()
121 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
132 const std::string& file_name =
"",
133 const std::string& function_name =
"" ,
134 unsigned line_number = 0) throw ()
135 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
147 const std::string& file_name =
"",
148 const std::string& function_name =
"" ,
149 unsigned line_number = 0) throw ()
150 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
161 const std::string& file_name =
"",
162 const std::string& function_name =
"" ,
163 unsigned line_number = 0) throw ()
164 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
175 const std::string& file_name =
"",
176 const std::string& function_name =
"" ,
177 unsigned line_number = 0) throw ()
178 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
190 const std::string& file_name =
"",
191 const std::string& function_name =
"" ,
192 unsigned line_number = 0) throw ()
193 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
204 const std::string& file_name =
"",
205 const std::string& function_name =
"" ,
206 unsigned line_number = 0) throw ()
207 : 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) { }
224 const std::string& file_name =
"",
225 const std::string& function_name =
"" ,
226 unsigned line_number = 0) throw ()
227 : pcl::
PCLException (error_description, file_name, function_name, line_number) { }
237 #define PCL_THROW_EXCEPTION(ExceptionName, message) \
239 std::ostringstream s; \
241 throw ExceptionName(s.str(), __FILE__, "", __LINE__); \