Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateAccessor.ConvertHibernateAccessException Method

Convert the given HibernateException to an appropriate exception from the

org.springframework.dao
hierarchy. Will automatically detect wrapped ADO.NET Exceptions and convert them accordingly.

[Visual Basic]
Public Overridable Sub ConvertHibernateAccessException( _
   ByVal ex As HibernateException _
)
[C#]
public virtual DataAccessException ConvertHibernateAccessException(
   HibernateException ex
);

Parameters

ex
HibernateException that occured.

Return Value

The corresponding DataAccessException instance

Remarks

The default implementation delegates to SessionFactoryUtils and convertAdoAccessException. Can be overridden in subclasses.

See Also

HibernateAccessor Class | Spring.Data.NHibernate Namespace