18 #ifndef SDF_EXCEPTION_HH_
19 #define SDF_EXCEPTION_HH_
27 #include <sdf/sdf_config.h>
34 #pragma warning(disable: 4251)
40 inline namespace SDF_VERSION_NAMESPACE {
48 #define sdfthrow(msg) {std::ostringstream throwStream;\
49 throwStream << msg << std::endl << std::flush;\
50 throw sdf::Exception(__FILE__, __LINE__, throwStream.str()); }
52 class ExceptionPrivate;
112 private: std::unique_ptr<ExceptionPrivate> dataPtr;
130 const std::string _msg);
153 const std::string _expr,
155 const std::string _function,
157 const std::string _msg =
"");
Class for generating Exceptions which come from sdf assertions.
Definition: Exception.hh:142
virtual ~AssertionInternalError()
Destructor.
AssertionInternalError(const char *_file, std::int64_t _line, const std::string _expr, const std::string _function, const std::string _msg="")
Constructor for assertions.
Class for generating exceptions.
Definition: Exception.hh:57
Exception & operator=(Exception &&_exception)
Move assignment operator.
Exception(const Exception &_e)
Copy constructor.
Exception & operator=(const Exception &_exception)
Assignment operator.
std::string GetErrorStr() const
Return the error string.
friend std::ostream & operator<<(std::ostream &_out, const sdf::Exception &_err)
stream insertion operator for Gazebo Error
Definition: Exception.hh:105
Exception(const char *_file, std::int64_t _line, std::string _msg)
Default constructor.
virtual ~Exception()
Destructor.
void Print() const
Print the exception to std out.
Exception(Exception &&_e) noexcept
Move constructor.
std::string GetErrorFile() const
Return the error function.
Class for generating Internal Gazebo Errors: those errors which should never happend and represent pr...
Definition: Exception.hh:120
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:33
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48