public static DataAccessException ConvertAdoAccessException(IAdoExceptionTranslator translator, ADOException ex)
{
try
{
string sqlString = (ex.SqlString != null)
? ex.SqlString.ToString()
: string.Empty;
return translator.Translate(
"Hibernate operation: " + ex.Message, sqlString, ex.InnerException);
} catch (Exception e)
{
log.Error("Exception thrown during exception translation. Message = [" + e.Message + "]", e);
log.Error("Exception that was attempted to be translated was [" + ex.Message + "]", ex);
if (ex.InnerException != null)
{
log.Error(" Inner Exception was [" + ex.InnerException.Message + "]", ex.InnerException);
}
throw new UncategorizedAdoException(e.Message, "", "", e);
}
}