Hopefully fixed exception handling in TBB (again)
parent
35924f6055
commit
ca9caf6a66
|
@ -22,6 +22,22 @@
|
|||
|
||||
namespace gtsam {
|
||||
|
||||
/* ************************************************************************* */
|
||||
const char* IndeterminantLinearSystemException::what() const throw()
|
||||
{
|
||||
if(!description_)
|
||||
description_ = String(
|
||||
"\nIndeterminant linear system detected while working near variable with\n"
|
||||
"index " + boost::lexical_cast<String>(j_) + " in ordering.\n"
|
||||
"\n\
|
||||
Thrown when a linear system is ill-posed. The most common cause for this\n\
|
||||
error is having underconstrained variables. Mathematically, the system is\n\
|
||||
underdetermined. See the GTSAM Doxygen documentation at\n\
|
||||
http://borg.cc.gatech.edu/ on gtsam::IndeterminantLinearSystemException for\n\
|
||||
more information.");
|
||||
return description_->c_str();
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
const char* InvalidNoiseModel::what() const throw() {
|
||||
if(description_.empty())
|
||||
|
|
|
@ -92,25 +92,13 @@ namespace gtsam {
|
|||
ordered in elimination order and occupy scalars in the same way as
|
||||
described for Jacobian columns in the previous bullet.
|
||||
*/
|
||||
class IndeterminantLinearSystemException : public ThreadsafeException<IndeterminantLinearSystemException> {
|
||||
class GTSAM_EXPORT IndeterminantLinearSystemException : public ThreadsafeException<IndeterminantLinearSystemException> {
|
||||
Index j_;
|
||||
public:
|
||||
IndeterminantLinearSystemException(Index j) throw() : j_(j) {}
|
||||
virtual ~IndeterminantLinearSystemException() throw() {}
|
||||
Index nearbyVariable() const { return j_; }
|
||||
virtual const char* what() const throw() {
|
||||
if(!description_)
|
||||
description_ = String(
|
||||
"\nIndeterminant linear system detected while working near variable with\n"
|
||||
"index " + boost::lexical_cast<String>(j_) + " in ordering.\n"
|
||||
"\n\
|
||||
Thrown when a linear system is ill-posed. The most common cause for this\n\
|
||||
error is having underconstrained variables. Mathematically, the system is\n\
|
||||
either underdetermined, or its quadratic error function is concave in some\n\
|
||||
directions. See the GTSAM Doxygen documentation at http://borg.cc.gatech.edu/ \n\
|
||||
on gtsam::IndeterminantLinearSystemException for more information.");
|
||||
return description_->c_str();
|
||||
}
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
Loading…
Reference in New Issue