SPRNET-1205 - ExecuteFind tries to throw ConvertADOAccessException but throws NullReferenceException

Lack of error code information in translated exceptions
This commit is contained in:
markpollack
2010-12-10 23:24:44 +00:00
parent 707edcb3fc
commit ddba95147b
3 changed files with 2 additions and 9 deletions

View File

@@ -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

View File

@@ -431,7 +431,6 @@ namespace Spring.Data.NHibernate
}
throw new UncategorizedAdoException(e.Message, "", "", e);
}
}
/// <summary>

View File

@@ -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>