Class BaseErrorReporter
Base class for classes that report errors to integrations, implemented by tasks and extractors respectively.
Inherited Members
Namespace: Cognite.Extractor.Utils.Unstable.Tasks
Assembly: ExtractorUtils.dll
Syntax
public abstract class BaseErrorReporter
Methods
| Edit this page View SourceBeginError(string, string?, DateTime?)
Begin a new error starting now.
Declaration
public ExtractorError BeginError(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Error description. |
string | details | Long error details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |
Returns
Type | Description |
---|---|
ExtractorError | An error that should be completed later. |
BeginFatal(string, string?, DateTime?)
Begin a new fatal error starting now.
Declaration
public ExtractorError BeginFatal(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Fatal error description. |
string | details | Long fatal error details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |
Returns
Type | Description |
---|---|
ExtractorError | An error that should be completed later. |
BeginWarning(string, string?, DateTime?)
Begin a new warning starting now.
Declaration
public ExtractorError BeginWarning(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Warning description. |
string | details | Long warning details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |
Returns
Type | Description |
---|---|
ExtractorError | An error that should be completed later. |
Error(string, string?, DateTime?)
Report an error that starts and ends now.
Declaration
public void Error(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Error description. |
string | details | Long error details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |
Fatal(string, string?, DateTime?)
Report a fatal error that starts and ends now.
Declaration
public void Fatal(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Fatal error description. |
string | details | Long fatal error details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |
NewError(ErrorLevel, string, string?, DateTime?)
Create a new extractor error belonging to this reporter.
Declaration
public abstract ExtractorError NewError(ErrorLevel level, string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
ErrorLevel | level | Error level. |
string | description | Short error description. |
string | details | Long error details. |
DateTime? | now | Optional current timestamp. |
Returns
Type | Description |
---|---|
ExtractorError |
Warning(string, string?, DateTime?)
Report a warning that starts and ends now.
Declaration
public void Warning(string description, string? details = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
string | description | Warning description. |
string | details | Long warning details. |
DateTime? | now | Current time, for synchronization. Defaults to DateTime.UtcNow |