#include <Error.hh>
|
std::ostream & | operator<< (std::ostream &_out, const sdf::Error &_err) |
| Output operator for an error. More...
|
|
◆ Error() [1/4]
sdf::v11::Error::Error |
( |
| ) |
|
◆ Error() [2/4]
sdf::v11::Error::Error |
( |
const ErrorCode |
_code, |
|
|
const std::string & |
_message |
|
) |
| |
Constructor.
- Parameters
-
[in] | _code | The error code. |
[in] | _message | A description of the error. |
- See also
- ErrorCode.
◆ Error() [3/4]
sdf::v11::Error::Error |
( |
const ErrorCode |
_code, |
|
|
const std::string & |
_message, |
|
|
const std::string & |
_filePath |
|
) |
| |
Constructor.
- Parameters
-
[in] | _code | The error code. |
[in] | _message | A description of the error. |
[in] | _filePath | The file path that is related to this error. |
- See also
- ErrorCode.
◆ Error() [4/4]
sdf::v11::Error::Error |
( |
const ErrorCode |
_code, |
|
|
const std::string & |
_message, |
|
|
const std::string & |
_filePath, |
|
|
int |
_lineNumber |
|
) |
| |
Constructor.
- Parameters
-
[in] | _code | The error code. |
[in] | _message | A description of the error. |
[in] | _filePath | The file path that is related to this error. |
[in] | _lineNumber | The line number in the provided file path where this error was raised. |
- See also
- ErrorCode.
◆ Code()
Get the error code.
- Returns
- An error code.
- See also
- ErrorCode.
◆ FilePath()
std::optional<std::string> sdf::v11::Error::FilePath |
( |
| ) |
const |
Get the file path associated with this error.
- Returns
- Returns the path of the file that this error is related to. nullopt otherwise.
◆ LineNumber()
std::optional<int> sdf::v11::Error::LineNumber |
( |
| ) |
const |
Get the line number associated with this error.
- Returns
- Returns the line number. nullopt otherwise.
◆ Message()
std::string sdf::v11::Error::Message |
( |
| ) |
const |
Get the error message, which is a description of the error.
- Returns
- Error message.
◆ operator bool()
sdf::v11::Error::operator bool |
( |
| ) |
const |
|
explicit |
Safe bool conversion.
- Returns
- True if this Error's Code() != NONE. In otherwords, this is true when there is an error.
◆ operator==()
bool sdf::v11::Error::operator== |
( |
const bool |
_value | ) |
const |
Compare this Error to a boolean value.
- Returns
- True if the boolean evaluation of this Error equals _value. If _value == false, then true is returned when this Error's Code() is equal to NONE and false is returned otherwise. If _value == true, then true is returned when this Error's Code() is not equal to NONE and false is returned otherwise.
- See also
- explicit operator bool() const
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const sdf::Error & |
_err |
|
) |
| |
|
friend |
Output operator for an error.
- Parameters
-
[in,out] | _out | The output stream. |
[in] | _err | The error to output. |
- Returns
- Reference to the given output stream
The documentation for this class was generated from the following file: