Table of Contents

Class Error

Namespace
ToSic.Eav.DataSources
Assembly
ToSic.Eav.DataSource.dll

Internal DataSource to generate an error on purpose. This is to test / verify error handling in VisualQuery. See also VisualQuery 3: Debugging

[VisualQuery(NiceName = "Error DataSource", UiHint = "Generate an error - primarily for debugging", Icon = "warning", Type = DataSourceType.Debug, Audience = Audience.Advanced, NameId = "e19ee6c4-5209-4c3d-8ae1-f4cbcf875c0a")]
[PublicApi]
public class Error : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
Inheritance
object
Error
Implements
Inherited Members

Remarks

In advanced programming scenarios you can also use this DataSource instead of another one to provide a stream of errors.

Constructors

Error(Dependencies)

Constructor to tell the system what out-streams we have. In this case it's just the "Default" containing a fake exception.

public Error(DataSourceBase.Dependencies services)

Parameters

services DataSourceBase.Dependencies

Properties

DelaySeconds

Delay the result by this many seconds.

[Configuration(Fallback = 0, CacheRelevant = false)]
public int DelaySeconds { get; }

Property Value

int

Remarks

Meant for testing scenarios where the error needs time - like waiting for a connection timeout. Default / fallback is 0 seconds, which means no delay.

Message

The error message. Defaults to "Demo message of the Error DataSource"

public string Message { get; set; }

Property Value

string

Title

The error title. Defaults to "Demo Error"

public string Title { get; set; }

Property Value

string