Class DataSourceErrorHelper
- Namespace
- ToSic.Eav.DataSource
- Assembly
- ToSic.Eav.DataSource.dll
An Errors-helper which is automatically available on all DataSourceBase objects.
It helps create a stream of standardized error entities.
[PublicApi]
public class DataSourceErrorHelper
- Inheritance
-
objectDataSourceErrorHelper
Remarks
Constructor - to find out if it's used anywhere
Constructors
DataSourceErrorHelper(DataBuilder)
An Errors-helper which is automatically available on all DataSourceBase objects.
It helps create a stream of standardized error entities.
public DataSourceErrorHelper(DataBuilder builder)
Parameters
builderDataBuilder
Remarks
Constructor - to find out if it's used anywhere
Methods
Create(NoParamOrder, string?, string?, Exception?, IDataSource?, string)
Create a stream containing an error entity.
public IImmutableList<IEntity> Create(NoParamOrder noParamOrder = default, string? title = null, string? message = null, Exception? exception = null, IDataSource? source = null, string streamName = "Default")
Parameters
noParamOrderNoParamOrdertitlestringError title
messagestringError message
exceptionExceptionException (if there was an exception)
sourceIDataSourceThe DataSource which created this error. If provided, will allow the message to contain more details.
streamNamestringThe stream name. If provided, will allow the message to contain more details.
Returns
TryGetInFailed(NoParamOrder, IDataSource?, string)
Create a stream of items showing a detailed error why an In stream was not found.
public IImmutableList<IEntity> TryGetInFailed(NoParamOrder noParamOrder = default, IDataSource? source = null, string name = "Default")
Parameters
noParamOrderNoParamOrdersourceIDataSourcenamestringName of the stream.
Returns
Remarks
Added v16.00
TryGetOutFailed(NoParamOrder, IDataSource?, string)
Create a stream of items showing a detailed error why an Out stream was not found.
public IImmutableList<IEntity> TryGetOutFailed(NoParamOrder noParamOrder = default, IDataSource? source = null, string name = "Default")
Parameters
noParamOrderNoParamOrdersourceIDataSourcenamestringName of the stream.
Returns
Remarks
Added v16.01