Go to the documentation of this file.
22 #include <sdf/sdf_config.h>
29 #pragma warning(disable: 4251)
35 inline namespace SDF_VERSION_NAMESPACE {
139 public:
Error() =
default;
145 public:
Error(
const ErrorCode _code,
const std::string &_message);
154 public: std::string Message()
const;
159 public:
explicit operator bool()
const;
168 public:
bool operator==(
const bool _value)
const;
177 _out <<
"Error Code "
178 <<
static_cast<std::underlying_type<sdf::ErrorCode>::type
>(_err.
Code())
184 private:
ErrorCode code = ErrorCode::NONE;
189 #pragma warning(push)
190 #pragma warning(disable: 4251)
192 private: std::string message =
"";
@ JOINT_PARENT_SAME_AS_CHILD
A joint has the same link specified as parent and child.
@ MODEL_CANONICAL_LINK_INVALID
A model with an invalid canonical link.
@ NESTED_MODELS_UNSUPPORTED
Indicates that a DOM object tried to read a nested model.
namespace for Simulation Description Format parser
Definition: Actor.hh:32
friend std::ostream & operator<<(std::ostream &_out, const sdf::Error &_err)
Output operator for an error.
Definition: Error.hh:174
@ ELEMENT_MISSING
Indicates that a required SDF element is missing.
@ POSE_RELATIVE_TO_INVALID
The pose relative-to value does not match the name of an existing frame in the current scope.
@ URI_LOOKUP
A error occured while trying to resolve a URI.
@ POSE_RELATIVE_TO_GRAPH_ERROR
The pose relative-to graph has an internal error.
@ FILE_READ
Indicates that reading an SDF file failed.
@ FRAME_ATTACHED_TO_INVALID
The frame attached-to value does not match the name of an existing frame in the current scope.
@ ATTRIBUTE_MISSING
Indicates that a required SDF attribute is missing.
@ STRING_READ
Indicates that reading an SDF string failed.
@ POSE_RELATIVE_TO_CYCLE
The pose relative-to graph contains a cycle.
@ FRAME_ATTACHED_TO_CYCLE
The frame attached-to graph contains a cycle.
@ ATTRIBUTE_DEPRECATED
This error indicates that an SDF attribute is deprecated.
ErrorCode Code() const
Get the error code.
@ ELEMENT_INVALID
This error indicates that an SDF element is invalid.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
@ DIRECTORY_NONEXISTANT
A filesystem directory does not exist.
@ URI_INVALID
A URI is invalid.
@ JOINT_PARENT_LINK_INVALID
A joint has an invalid parent link.
@ FRAME_ATTACHED_TO_GRAPH_ERROR
The frame attached-to graph has an internal error.
ErrorCode
Definition: Error.hh:44
@ LINK_INERTIA_INVALID
A link has invalid inertia.
@ MODEL_WITHOUT_LINK
A model without a link.
@ ELEMENT_INCORRECT_TYPE
Indicates that an incorrect SDF element type was encountered.
@ ELEMENT_DEPRECATED
This error indicates that an SDF element is deprecated.
@ ATTRIBUTE_INVALID
This error indicates that an SDF attribute is invalid.
@ JOINT_CHILD_LINK_INVALID
A joint has an invalid child link.
@ DUPLICATE_NAME
A duplicate name was found for an element where unique names are required.
@ RESERVED_NAME
A reserved name was used in an entity name attribute.
std::string Message() const
Get the error message, which is a description of the error.