18 #ifndef _SDF_EXCEPTION_HH_
19 #define _SDF_EXCEPTION_HH_
32 #define sdfthrow(msg) {std::ostringstream throwStream;\
33 throwStream << msg << std::endl << std::flush;\
34 throw sdf::Exception(__FILE__, __LINE__, throwStream.str()); }
63 public:
void Print()
const;
66 private: std::string file;
72 private: std::string str;
77 public:
friend std::ostream &
operator<<(std::ostream& _out,
98 const std::string _msg);
120 const std::string _expr,
121 const std::string _function,
122 const std::string _msg =
"");
virtual ~InternalError()
Destructor.
friend std::ostream & operator<<(std::ostream &_out, const sdf::Exception &_err)
stream insertion operator for Gazebo Error
Definition: Exception.hh:77
virtual ~AssertionInternalError()
Destructor.
InternalError()
Constructor.
Class for generating Internal Gazebo Errors: those errors which should never happend and represent pr...
Definition: Exception.hh:88
Class for generating exceptions.
Definition: Exception.hh:38
std::string GetErrorFile() const
Return the error function.
virtual ~Exception()
Destructor.
std::string GetErrorStr() const
Return the error string.
Class for generating Exceptions which come from sdf assertions.
Definition: Exception.hh:109
void Print() const
Print the exception to std out.
AssertionInternalError(const char *_file, int _line, const std::string _expr, const std::string _function, const std::string _msg="")
Constructor for assertions.