ErrorInfo¶
primo::error::ErrorInfo
-
class ErrorInfo : public primo::Reference¶
Describes an error interface used for uniform error handling across all Primo Software libraries.
Public Functions
-
virtual int32_t code() const = 0¶
Error code.
Its meaning depends on the error facility .
- Returns:
The error code as defined by the appropriate error facility.
-
virtual void setCode(int32_t code) = 0¶
Sets the error code.
Its meaning depends on the error facility .
- Parameters:
code – An error code
-
virtual int32_t facility() const = 0¶
Error facility.
This is the component that reports the error.
- Returns:
An ErrorFacility constant.
-
virtual void setFacility(int32_t facility) = 0¶
Sets the error faiclity.
This is the component that reports the error.
- Parameters:
facility – An Error facility constant
-
virtual const char_t *message() const = 0¶
Error message.
This is a textual representation of the error code.
Note
The returned string is never NULL. It is an empty string when the error hint is not set.
- Returns:
Unicode string.
-
virtual void setMessage(const char_t *message) = 0¶
Sets or clears the error message.
It is a textual representation of the error code.
- Parameters:
message – A pointer to zero terminated Unicode string. Can be NULL in which case the error message is cleared.
-
virtual const char_t *hint() const = 0¶
Diagnostic hint.
This is an implementation specific diagnostics message, suitable for error logs or debugging.
Note
The returned string is never NULL. It is an empty string when the error hint is not set.
- Returns:
Unicode string.
-
virtual void setHint(const char_t *hint) = 0¶
Sets or clears the error hint.
It is an implementation specific diagnostics message, suitable for error logs or debugging.
- Parameters:
hint – A pointer to zero terminated Unicode string. Can be NULL in which case the error hint is cleared.
-
virtual const char_t *block() const = 0¶
The component that has generated the error.
Note
The returned string is never NULL. It is an empty string when the component is not set.
- Returns:
Unicode string.
-
virtual void setBlock(const char_t *block) = 0¶
Sets or clears the error block.
It is the component that has generated the error.
- Parameters:
block – A pointer to zero terminated Unicode string. Can be NULL in which case the error block is cleared.
-
virtual int32_t code() const = 0¶