|
FOSSredder 0.5.0
|
Namespaces | |
| namespace | codes |
Classes | |
| struct | ErrorEvent |
| Structured error payload sent through diagnostics ports. More... | |
Typedefs | |
| using | ErrorContext = std::vector<std::pair<std::string, std::string>> |
| Key/value context attached to an error event. | |
Enumerations | |
| enum class | ErrorSeverity { Info , Warning , Error , Critical } |
| Severity level for structured error events. More... | |
Functions | |
| const char * | severityToString (ErrorSeverity severity) noexcept |
| Convert an error severity to a stable lowercase label. | |
| ErrorEvent | makeExceptionEvent (ErrorSeverity severity, const char *code, const char *origin, std::exception_ptr exception, ErrorContext context={}) |
| Build a structured event from an exception pointer. | |
| void | report (core::ports::diagnostics::IErrorReporter *reporter, const ErrorEvent &event) |
| Report an already constructed error event when a reporter exists. | |
| void | report (core::ports::diagnostics::IErrorReporter *reporter, ErrorSeverity severity, const char *code, const char *origin, std::string message, ErrorContext context={}) |
| Construct and report a structured error event. | |
| void | reportException (core::ports::diagnostics::IErrorReporter *reporter, ErrorSeverity severity, const char *origin, std::exception_ptr exception) |
| Report an exception through the reporter's default exception handling. | |
| void | reportException (core::ports::diagnostics::IErrorReporter *reporter, ErrorSeverity severity, const char *code, const char *origin, std::exception_ptr exception, ErrorContext context={}) |
| Build and report a structured exception event. | |
| using core::errors::ErrorContext = std::vector<std::pair<std::string, std::string>> |
Key/value context attached to an error event.
Definition at line 27 of file ErrorEvent.h.
|
strong |
Severity level for structured error events.
| Enumerator | |
|---|---|
| Info | |
| Warning | |
| Error | |
| Critical | |
Definition at line 17 of file ErrorEvent.h.
|
inline |
Build a structured event from an exception pointer.
| severity | Severity to store on the event. |
| code | Optional structured error code. |
| origin | Optional origin string describing the reporting site. |
| exception | Exception pointer to inspect. |
| context | Additional event context. |
Definition at line 47 of file ErrorEventFactory.h.

|
inline |
Report an already constructed error event when a reporter exists.
| reporter | Optional reporter port. |
| event | Event to report. |
Definition at line 23 of file ErrorReporting.h.


|
inline |
Construct and report a structured error event.
| reporter | Optional reporter port. |
| severity | Severity to store on the event. |
| code | Optional structured error code. |
| origin | Optional origin string describing the reporting site. |
| message | Human-readable error message. |
| context | Additional event context. |
Definition at line 38 of file ErrorReporting.h.
|
inline |
Build and report a structured exception event.
| reporter | Optional reporter port. |
| severity | Severity to apply to the exception event. |
| code | Optional structured error code. |
| origin | Optional origin string describing the reporting site. |
| exception | Exception pointer to inspect. |
| context | Additional event context. |
Definition at line 74 of file ErrorReporting.h.
|
inline |
Report an exception through the reporter's default exception handling.
| reporter | Optional reporter port. |
| severity | Severity to apply to the exception event. |
| origin | Optional origin string describing the reporting site. |
| exception | Exception pointer to report. |
Definition at line 58 of file ErrorReporting.h.


|
inlinenoexcept |
Convert an error severity to a stable lowercase label.
| severity | Severity value to convert. |
Definition at line 23 of file ErrorEventFactory.h.