FOSSredder
0.5.0
Loading...
Searching...
No Matches
ErrorEvent.h
Go to the documentation of this file.
1
5
6
#pragma once
7
8
#include <string>
9
#include <utility>
10
#include <vector>
11
12
namespace
core::errors
{
13
17
enum class
ErrorSeverity
{
18
Info
,
19
Warning
,
20
Error
,
21
Critical
22
};
23
27
using
ErrorContext
= std::vector<std::pair<std::string, std::string>>;
28
32
struct
ErrorEvent
{
33
ErrorSeverity
severity
=
ErrorSeverity::Error
;
34
std::string
origin
;
35
std::string
message
;
36
std::string
exceptionType
;
37
std::string
code
=
"GENERIC_ERROR"
;
38
ErrorContext
context
;
39
};
40
41
}
// namespace core::errors
core::errors
Definition
core/include/core/errors/ErrorCodes.h:8
core::errors::ErrorSeverity
ErrorSeverity
Severity level for structured error events.
Definition
ErrorEvent.h:17
core::errors::ErrorSeverity::Warning
@ Warning
Definition
ErrorEvent.h:19
core::errors::ErrorSeverity::Critical
@ Critical
Definition
ErrorEvent.h:21
core::errors::ErrorSeverity::Info
@ Info
Definition
ErrorEvent.h:18
core::errors::ErrorSeverity::Error
@ Error
Definition
ErrorEvent.h:20
core::errors::ErrorContext
std::vector< std::pair< std::string, std::string > > ErrorContext
Key/value context attached to an error event.
Definition
ErrorEvent.h:27
core::errors::ErrorEvent
Structured error payload sent through diagnostics ports.
Definition
ErrorEvent.h:32
core::errors::ErrorEvent::origin
std::string origin
Definition
ErrorEvent.h:34
core::errors::ErrorEvent::code
std::string code
Definition
ErrorEvent.h:37
core::errors::ErrorEvent::exceptionType
std::string exceptionType
Definition
ErrorEvent.h:36
core::errors::ErrorEvent::severity
ErrorSeverity severity
Definition
ErrorEvent.h:33
core::errors::ErrorEvent::message
std::string message
Definition
ErrorEvent.h:35
core::errors::ErrorEvent::context
ErrorContext context
Definition
ErrorEvent.h:38
core
include
core
errors
ErrorEvent.h
Generated by
1.14.0