@@ -21,12 +21,13 @@ public static class ADOExceptionHelper
21
21
/// <param name="message">An optional error message.</param>
22
22
/// <param name="sql">The SQL executed.</param>
23
23
/// <returns> The converted <see cref="ADOException"/>.</returns>
24
- public static ADOException Convert ( ISQLExceptionConverter converter , Exception sqlException , string message ,
24
+ public static Exception Convert ( ISQLExceptionConverter converter , Exception sqlException , string message ,
25
25
SqlString sql )
26
26
{
27
27
sql = TryGetActualSqlQuery ( sqlException , sql ) ;
28
28
ADOExceptionReporter . LogExceptions ( sqlException , ExtendMessage ( message , sql , null , null ) ) ;
29
- return converter . Convert ( sqlException , message , sql ) ;
29
+ return
30
+ converter . Convert ( new AdoExceptionContextInfo { SqlException = sqlException , Message = message , Sql = sql . ToString ( ) } ) ;
30
31
}
31
32
32
33
/// <summary>
@@ -37,7 +38,7 @@ public static ADOException Convert(ISQLExceptionConverter converter, Exception s
37
38
/// <param name="sqlException">The exception to convert.</param>
38
39
/// <param name="message">An optional error message.</param>
39
40
/// <returns> The converted <see cref="ADOException"/>.</returns>
40
- public static ADOException Convert ( ISQLExceptionConverter converter , Exception sqlException , string message )
41
+ public static Exception Convert ( ISQLExceptionConverter converter , Exception sqlException , string message )
41
42
{
42
43
var sql = new SqlString ( SQLNotAvailable ) ;
43
44
sql = TryGetActualSqlQuery ( sqlException , sql ) ;
@@ -50,7 +51,7 @@ public static ADOException Convert(ISQLExceptionConverter converter, Exception s
50
51
sql = TryGetActualSqlQuery ( sqle , sql ) ;
51
52
string extendMessage = ExtendMessage ( message , sql , parameterValues , namedParameters ) ;
52
53
ADOExceptionReporter . LogExceptions ( sqle , extendMessage ) ;
53
- return new ADOException ( extendMessage , sqle , sql ) ;
54
+ return new ADOException ( extendMessage , sqle , sql . ToString ( ) ) ;
54
55
}
55
56
56
57
/// <summary> For the given <see cref="Exception"/>, locates the <see cref="System.Data.Common.DbException"/>. </summary>
0 commit comments