Workflow Engine .NET

Assembly: OptimaJet.Workflow.SQLite

Class Extensions

OptimaJet.Workflow.SQLite.Extensions

Extension methods for SQLite exception handling.

public static class Extensions

Inheritance

  • Object

Methods

public static PersistenceProviderQueryException ToQueryException(this Exception exception, bool suppressRetry = false) #
Converts an exception to a PersistenceProviderQueryException, preserving retry information if the original exception is already a PersistenceProviderQueryException.

Parameters

Name
Type
Description
exception
Exception
The exception to convert.
suppressRetry
Boolean
If set to true, the resulting exception will not allow retry.

Returns

Type
Description
PersistenceProviderQueryException
A PersistenceProviderQueryException wrapping the original exception.
public static bool IsDuplicateKeyException(this PersistenceProviderQueryException exception) #
Determines whether the specified PersistenceProviderQueryException is caused by a duplicate key violation.

Parameters

Name
Type
Description
exception
PersistenceProviderQueryException
The exception to check.

Returns

Type
Description
Boolean
true if the inner exception is a SQLite duplicate key error (error code 19); otherwise, false.