SPRNET-1205 - ExecuteFind tries to throw ConvertADOAccessException but throws NullReferenceException
Lack of error code information in translated exceptions
This commit is contained in:
@@ -550,13 +550,7 @@ namespace Spring.Data.NHibernate
|
||||
/// </returns>
|
||||
protected virtual DataAccessException ConvertAdoAccessException(ADOException ex)
|
||||
{
|
||||
|
||||
string sqlString = (ex.SqlString != null)
|
||||
? ex.SqlString.ToString()
|
||||
: string.Empty;
|
||||
return AdoExceptionTranslator.Translate(
|
||||
"Hibernate operation: " + ex.Message, sqlString, ex.InnerException);
|
||||
|
||||
return SessionFactoryUtils.ConvertAdoAccessException(AdoExceptionTranslator, ex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -431,7 +431,6 @@ namespace Spring.Data.NHibernate
|
||||
}
|
||||
throw new UncategorizedAdoException(e.Message, "", "", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -869,7 +869,7 @@ namespace Spring.Data.NHibernate
|
||||
/// </returns>
|
||||
protected virtual DataAccessException ConvertAdoAccessException(ADOException ex, IAdoExceptionTranslator translator)
|
||||
{
|
||||
return translator.Translate("Hibernate flusing: " + ex.Message, null, ex.InnerException);
|
||||
return translator.Translate("Hibernate flushing: " + ex.Message, null, ex.InnerException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user