18#ifndef SDF_EXCEPTION_HH_
19#define SDF_EXCEPTION_HH_
27#include <gz/utils/ImplPtr.hh>
34 inline namespace SDF_VERSION_NAMESPACE {
42 #define sdfthrow(msg) {std::ostringstream throwStream;\
43 throwStream << msg << std::endl << std::flush;\
44 throw sdf::Exception(__FILE__, __LINE__, throwStream.str()); }
97 public:
friend std::ostream &
operator<<(std::ostream& _out,
104 GZ_UTILS_IMPL_PTR(dataPtr)
122 const std::string _msg);
145 const std::string _expr,
147 const std::string _function,
149 const std::string _msg =
"");
Class for generating Exceptions which come from sdf assertions.
Definition: Exception.hh:134
AssertionInternalError(const char *_file, std::int64_t _line, const std::string _expr, const std::string _function, const std::string _msg="")
Constructor for assertions.
virtual ~AssertionInternalError()
Destructor.
Class for generating exceptions.
Definition: Exception.hh:49
virtual ~Exception()=default
Destructor.
Exception(Exception &&_e) noexcept=default
Move constructor.
std::string GetErrorStr() const
Return the error string.
void Print() const
Print the exception to std out.
friend std::ostream & operator<<(std::ostream &_out, const sdf::Exception &_err)
stream insertion operator for Gazebo Error
Definition: Exception.hh:97
Exception(const Exception &_e)=default
Copy constructor.
Exception & operator=(const Exception &_exception)=default
Assignment operator.
Exception & operator=(Exception &&_exception) noexcept=default
Move assignment operator.
std::string GetErrorFile() const
Return the error function.
Exception(const char *_file, std::int64_t _line, std::string _msg)
Default constructor.
Class for generating Internal Gazebo Errors: those errors which should never happend and represent pr...
Definition: Exception.hh:112
InternalError(const char *_file, std::int64_t _line, const std::string _msg)
Default constructor.
InternalError()
Constructor.
virtual ~InternalError()
Destructor.
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25