ThrowExceptionIf Class
Throws an exception if a condition is true.
Namespace
Statiq.Core
Interfaces
Base Types
graph BT Type-->Base0["ThrowException"] click Base0 "/api/Statiq.Core/ThrowException" Base0-->Base1["SyncConfigModule<Exception>"] Base1-->Base2["ConfigModule<Exception>"] Base2-->Base3["Module"] click Base3 "/api/Statiq.Common/Module" Base3-->Base4["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["ThrowExceptionIf"] class Type type-node

Syntax

public class ThrowExceptionIf : ThrowException, IModule

Constructors

Name Summary
ThrowExceptionIf(Config<bool>, Config<Exception>) Throws the specified exception if the condition is true.
ThrowExceptionIf(Config<bool>, Config<string>) Throws a ExecutionException with the specified message if the condition is true.
ThrowExceptionIf(Config<bool>)

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteConfig(IDocument, IExecutionContext, Exception) IEnumerable<IDocument>
Inherited from ThrowException
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module

Extension Methods