Skip to content

Commit cfd2555

Browse files
Cease encapsulating exceptions in MySql batcher, it prevents exception translation.
1 parent 38e73a9 commit cfd2555

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/NHibernate/AdoNet/MySqlClientSqlCommandSet.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,17 @@ public void Dispose()
5151

5252
public int ExecuteNonQuery()
5353
{
54-
try
54+
if (CountOfCommands == 0)
5555
{
56-
if (CountOfCommands == 0)
57-
{
58-
return 0;
59-
}
60-
61-
return doExecuteNonQuery(instance);
62-
}
63-
catch (Exception exception)
64-
{
65-
throw new HibernateException("An exception occured when executing batch queries", exception);
56+
return 0;
6657
}
58+
59+
return doExecuteNonQuery(instance);
6760
}
6861

6962
public int CountOfCommands
7063
{
7164
get { return countOfCommands; }
7265
}
7366
}
74-
}
67+
}

0 commit comments

Comments
 (0)