Go to the documentation of this file.
23 #include <gz/utils/ImplPtr.hh>
32 #pragma warning(disable: 4251)
38 inline namespace SDF_VERSION_NAMESPACE {
196 public:
Error(
const ErrorCode _code,
const std::string &_message);
204 const std::string &_filePath);
214 const std::string &_filePath,
int _lineNumber);
223 public: std::string Message()
const;
227 public:
void SetMessage(
const std::string &_message);
232 public: std::optional<std::string> FilePath()
const;
237 public:
void SetFilePath(
const std::string &_filePath);
241 public: std::optional<int> LineNumber()
const;
245 public:
void SetLineNumber(
int _lineNumber);
250 public: std::optional<std::string> XmlPath()
const;
256 public:
void SetXmlPath(
const std::string &_xmlPath);
261 public:
explicit operator bool()
const;
270 public:
bool operator==(
const bool _value)
const;
280 GZ_UTILS_IMPL_PTR(dataPtr)
@ MODEL_PLACEMENT_FRAME_INVALID
The specified placement frame is invalid.
@ ROTATION_SNAP_CONFIG_ERROR
The rotation snap config provided is not valid.
@ VERSION_DEPRECATED
The provided version has been deprecated or it is pre-versioning.
@ PARSING_ERROR
Generic error during parsing.
@ DIRECTORY_NONEXISTANT
A filesystem directory does not exist.
@ JOINT_CHILD_LINK_INVALID
A joint has an invalid child link.
@ ELEMENT_DEPRECATED
This error indicates that an SDF element is deprecated.
@ ATTRIBUTE_INVALID
This error indicates that an SDF attribute is invalid.
@ FRAME_ATTACHED_TO_INVALID
The frame attached-to value does not match the name of an existing frame in the current scope.
namespace for Simulation Description Format parser
Definition: Actor.hh:34
@ CONVERSION_ERROR
SDF conversion generic error.
@ ELEMENT_INVALID
This error indicates that an SDF element is invalid.
@ JOINT_AXIS_EXPRESSED_IN_INVALID
The joint axis expressed-in value does not match the name of an existing frame in the current scope.
@ FRAME_ATTACHED_TO_CYCLE
The frame attached-to graph contains a cycle.
@ ELEMENT_INCORRECT_TYPE
Indicates that an incorrect SDF element type was encountered.
@ NESTED_MODELS_UNSUPPORTED
Indicates that a DOM object tried to read a nested model.
@ FILE_READ
Indicates that reading an SDF file failed.
@ ATTRIBUTE_DEPRECATED
This error indicates that an SDF attribute is deprecated.
@ XML_ERROR
Error at the XML level.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
@ ATTRIBUTE_MISSING
Indicates that a required SDF attribute is missing.
@ WARNING
Generic warning saved as error due to WarningsPolicy config.
@ JOINT_PARENT_SAME_AS_CHILD
A joint has the same link specified as parent and child.
@ URI_INVALID
A URI is invalid.
@ URI_LOOKUP
A error occured while trying to resolve a URI.
std::ostream & operator<<(std::ostream &os, ParamStreamer< T > s)
Definition: Param.hh:94
@ POSE_RELATIVE_TO_INVALID
The pose relative-to value does not match the name of an existing frame in the current scope.
@ STRING_READ
Indicates that reading an SDF string failed.
@ PARAMETER_ERROR
Generic error type for parameters (values of SDFormat elements or attributes).
@ POSE_RELATIVE_TO_GRAPH_ERROR
The pose relative-to graph has an internal error.
@ ELEMENT_MISSING
Indicates that a required SDF element is missing.
ErrorCode
Definition: Error.hh:47
@ JOINT_PARENT_LINK_INVALID
A joint has an invalid parent link.
@ DUPLICATE_NAME
A duplicate name was found for an element where unique names are required.
@ MERGE_INCLUDE_UNSUPPORTED
Merge include is unspported for the type of entity being included, or the custom parser does not supp...
@ MODEL_CANONICAL_LINK_INVALID
A model with an invalid canonical link.
@ MODEL_WITHOUT_LINK
A model without a link.
@ ATTRIBUTE_INCORRECT_TYPE
Indicates an attribute was included that is not part of the sdf spec.
@ FATAL_ERROR
Generic error to be thrown with SDF_ASSERT by the caller.
@ RESERVED_NAME
A reserved name was used in an entity name attribute.
@ ELEMENT_ERROR
Generic error type for Elements.
@ FRAME_ATTACHED_TO_GRAPH_ERROR
The frame attached-to graph has an internal error.
@ LINK_INERTIA_INVALID
A link has invalid inertia.
@ POSE_RELATIVE_TO_CYCLE
The pose relative-to graph contains a cycle.
@ UNKNOWN_PARAMETER_TYPE
The specified parameter (values of SDFormat elements or attributes) type is unknown.
void GZ_SDFORMAT_VISIBLE throwOrPrintError(sdf::Console::ConsoleStream &_out, const sdf::Error &_error)
Prints the error to _out or throw using SDF_ASSERT depending on the ErrorCode in _error.