WhenSqlError
Namespace: PPJ.Runtime.Sql
Assembly: PPJ.Web.50 (5.0.0.0)
Temporarily suppresses global SQL error dispatch while a translated local SQL error block runs.
- C#
- VB.NET
public class WhenSqlError : IDisposable
Public Class WhenSqlError
Inherits IDisposable
Construction increments the current runtime globals nesting count; disposal decrements it. Dispose each instance exactly once in the same runtime context. This scope does not catch exceptions or provide an error handler.
Example:
using PPJ.Runtime.Sql;
using (new WhenSqlError())
{
// Execute SQL operations with the translated local error handling.
}
Constructors
WhenSqlError()
Begins a global SQL error suppression scope in the current runtime context.
Methods
Dispose()
Ends one global SQL error suppression scope.
This method does not guard against repeated disposal.