23#include <gz/utils/ImplPtr.hh>
31#pragma warning(disable: 4251)
37 inline namespace SDF_VERSION_NAMESPACE {
72 ATTRIBUTE_INCORRECT_TYPE,
86 ELEMENT_INCORRECT_TYPE,
95 DIRECTORY_NONEXISTANT,
98 MODEL_CANONICAL_LINK_INVALID,
104 NESTED_MODELS_UNSUPPORTED,
107 LINK_INERTIA_INVALID,
110 JOINT_CHILD_LINK_INVALID,
113 JOINT_PARENT_LINK_INVALID,
116 JOINT_PARENT_SAME_AS_CHILD,
120 FRAME_ATTACHED_TO_INVALID,
123 FRAME_ATTACHED_TO_CYCLE,
126 FRAME_ATTACHED_TO_GRAPH_ERROR,
130 POSE_RELATIVE_TO_INVALID,
133 POSE_RELATIVE_TO_CYCLE,
136 POSE_RELATIVE_TO_GRAPH_ERROR,
142 MODEL_PLACEMENT_FRAME_INVALID,
149 MERGE_INCLUDE_UNSUPPORTED,
169 const std::string &_filePath);
179 const std::string &_filePath,
int _lineNumber);
193 public: std::optional<std::string>
FilePath()
const;
211 public: std::optional<std::string>
XmlPath()
const;
222 public:
explicit operator bool()
const;
241 IGN_UTILS_IMPL_PTR(dataPtr)
std::string Message() const
Get the error message, which is a description of the error.
std::optional< std::string > FilePath() const
Get the file path associated with this error.
Error(const ErrorCode _code, const std::string &_message, const std::string &_filePath, int _lineNumber)
Constructor.
bool operator==(const bool _value) const
Compare this Error to a boolean value.
void SetLineNumber(int _lineNumber)
Sets the line number that is associated with this error.
ErrorCode Code() const
Get the error code.
void SetFilePath(const std::string &_filePath)
Sets the file path that is associated with this error.
Error()
Default constructor.
void SetXmlPath(const std::string &_xmlPath)
Safe bool conversion.
Error(const ErrorCode _code, const std::string &_message, const std::string &_filePath)
Constructor.
std::optional< int > LineNumber() const
Get the line number associated with this error.
std::optional< std::string > XmlPath() const
Get the XPath-like trace that is associated with this error.
friend IGNITION_SDFORMAT_VISIBLE std::ostream & operator<<(std::ostream &_out, const sdf::Error &_err)
Output operator for an error.
Error(const ErrorCode _code, const std::string &_message)
Constructor.
ErrorCode
Set of error codes.
Definition: Error.hh:47
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