Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

DataAccessUtils.TranslateIfNecessary Method

Return a translated exception if this is appropriate, or null if the exception could not be translated.

[Visual Basic]
Public Shared Sub TranslateIfNecessary( _
   ByVal rawException As Exception, _
   ByVal pet As IPersistenceExceptionTranslator _
)
[C#]
public static DataAccessException TranslateIfNecessary(
   Exception rawException,
   IPersistenceExceptionTranslator pet
);

Parameters

rawException
The raw exception we may wish to translate.
pet
The PersistenceExceptionTranslator to use to perform the translation.

Return Value

A translated exception if translation is possible, or or null if the exception could not be translated.

See Also

DataAccessUtils Class | Spring.Dao.Support Namespace