Go to the documentation of this file.
22 #ifndef _GAZEBO_EXCEPTION_HH_
23 #define _GAZEBO_EXCEPTION_HH_
39 #define gzthrow(msg) {std::ostringstream throwStream;\
40 throwStream << msg << std::endl << std::flush;\
41 throw gazebo::common::Exception(__FILE__, __LINE__, throwStream.str()); }
63 public: std::string GetErrorFile()
const;
67 public: std::string GetErrorStr()
const;
70 public:
void Print()
const;
73 private: std::string file;
79 private: std::string str;
84 public:
friend std::ostream &
operator<<(std::ostream &_out,
105 const std::string &_msg);
127 const std::string &_expr,
128 const std::string &_function,
129 const std::string &_msg =
"");
virtual ~AssertionInternalError()
Destructor.
Class for generating exceptions.
Definition: Exception.hh:45
Forward declarations for the common classes.
Definition: Animation.hh:26
common
Definition: FuelModelDatabase.hh:37
void Print() const
Print the exception to std out.
virtual ~Exception()
Destructor.
std::string GetErrorFile() const
Return the error function.
AssertionInternalError(const char *_file, int _line, const std::string &_expr, const std::string &_function, const std::string &_msg="")
Constructor for assertions.
InternalError()
Constructor.
virtual ~InternalError()
Destructor.
std::string GetErrorStr() const
Return the error string.
Class for generating Internal Gazebo Errors: those errors which should never happend and represent pr...
Definition: Exception.hh:95
friend std::ostream & operator<<(std::ostream &_out, const gazebo::common::Exception &_err)
stream insertion operator for Gazebo Error
Definition: Exception.hh:84
Class for generating Exceptions which come from gazebo assertions. They include information about the...
Definition: Exception.hh:116