Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ErrorCodeExceptionTranslator.DoTranslate Method

Template method for actually translating the given exception. given SystemException into a generic data access exception.

[Visual Basic]
Protected Overridable Sub DoTranslate( _
   ByVal task As String, _
   ByVal sql As String, _
   ByVal errorCode As String, _
   ByVal exception As Exception _
)
[C#]
protected virtual DataAccessException DoTranslate(
   string task,
   string sql,
   string errorCode,
   Exception exception
);

Parameters

task
A readable string describing the task being attempted.
sql
The SQL query or update that caused the problem. May be null.
errorCode
The error code.
exception
The Exception encountered by the ADO.NET implementation.

Return Value

A DataAccessException appropriate for the supplied exception.

Remarks

The passed-in arguments will have been pre-checked. furthermore, this method is allowed to return

null
to indicate that no exception match has been found and that fallback translation should kick in.

See Also

ErrorCodeExceptionTranslator Class | Spring.Data.Support Namespace