Class SqlBatchErrorException
- Namespace
- ItTiger.TigerQuery
- Assembly
- ItTiger.TigerQuery.dll
[Serializable]
public sealed class SqlBatchErrorException : Exception, ISerializable
- Inheritance
-
SqlBatchErrorException
- Implements
- Inherited Members
Remarks
The engine enables
FireInfoMessageEventOnUserErrors
so that a script keeps running past a recoverable server error and every
diagnostic reaches the message callback in order. As a result SQL Server
user errors — severity 11 through 16, which is what RAISERROR and
THROW normally produce — arrive as events rather than as a
SqlException. This exception is the
engine's representation of those errors so that a failed batch always carries
a diagnostic, whichever transport the provider chose.
It is never thrown out of a run method. It appears as Exception for the failing attempt and, when that failure stops the run, as Exception. The individual server diagnostics remain available through Errors with their original number, severity, state, procedure, and line.
Constructors
SqlBatchErrorException()
public SqlBatchErrorException()
SqlBatchErrorException(string)
public SqlBatchErrorException(string message)
Parameters
messagestring- The error message.
SqlBatchErrorException(string, Exception)
public SqlBatchErrorException(string message, Exception inner)
Parameters
Properties
Errors
public IReadOnlyList<SqlCmdMessage> Errors { get; }