18 #ifndef _SDF_EXCEPTION_HH_
19 #define _SDF_EXCEPTION_HH_
34 #define sdfthrow(msg) {std::ostringstream throwStream;\
35 throwStream << msg << std::endl << std::flush;\
36 throw sdf::Exception(__FILE__, __LINE__, throwStream.str()); }
58 public: std::string GetErrorFile()
const;
62 public: std::string GetErrorStr()
const;
65 public:
void Print()
const;
68 private: std::string file;
74 private: std::string str;
79 public:
friend std::ostream &
operator<<(std::ostream& _out,
100 const std::string _msg);
122 const std::string _expr,
123 const std::string _function,
124 const std::string _msg =
"");
friend std::ostream & operator<<(std::ostream &_out, const sdf::Exception &_err)
stream insertion operator for Gazebo Error
Definition: Exception.hh:79
Class for generating Internal Gazebo Errors: those errors which should never happend and represent pr...
Definition: Exception.hh:90
Class for generating exceptions.
Definition: Exception.hh:40
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
std::string GetErrorStr() const
Return the error string.
namespace for Simulation Description Format parser
Definition: Console.hh:29
Class for generating Exceptions which come from sdf assertions.
Definition: Exception.hh:111