Interface IAppErrorService
Provides methods to manage application errors.
Namespace: DataWeb.Error
Assembly: DataWeb.Core.dll
Syntax
public interface IAppErrorService
Methods
GetErrorAsync(string)
Retrieves an error with the specified Id asynchronously.
Declaration
Task<AppError> GetErrorAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The Id of the error to retrieve. |
Returns
Type | Description |
---|---|
Task<AppError> | An AppError object if found, otherwise null. |
GetErrorsAsync()
Retrieves all errors asynchronously.
Declaration
Task<IEnumerable<AppError>> GetErrorsAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<AppError>> | A collection of AppError objects. |
GetErrorsCountAsync()
Retrieves the count of all errors asynchronously.
Declaration
Task<long> GetErrorsCountAsync()
Returns
Type | Description |
---|---|
Task<long> | The count of all errors. |
RemoveAllAsync()
Removes all errors asynchronously.
Declaration
Task RemoveAllAsync()
Returns
Type | Description |
---|---|
Task |
SetEntryAsync(string, string, string, string)
Sets a new error log entry asynchronously.
Declaration
Task SetEntryAsync(string errorMessage, string errorStackTrace = null, string errorUrl = null, string userIdMaster = null)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | The error message to log. |
string | errorStackTrace | The stack trace of the error (optional). |
string | errorUrl | The URL where the error occurred (optional). |
string | userIdMaster | The Id of the user associated with the error (optional). |
Returns
Type | Description |
---|---|
Task |