Skip to content

Commit 4c1e27f

Browse files
Merge two logs in one
There is no need for logging the exception separately. Moreover, some data providers (Sybase.AdoNet4.AseClient) sometimes fail when reading the exception message, causing this way of logging to fail the whole program.
1 parent 41782de commit 4c1e27f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/NHibernate/Async/Tool/hbm2ddl/SchemaExport.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ private async Task ExecuteInitializedAsync(Action<string> scriptAction, bool exe
173173
catch (OperationCanceledException) { throw; }
174174
catch (Exception e)
175175
{
176-
log.Warn("Unsuccessful: {0}", sql);
177-
log.Warn(e, e.Message);
176+
log.Warn(e, "Unsuccessful: {0}", sql);
178177
if (throwOnError)
179178
{
180179
throw;

src/NHibernate/Tool/hbm2ddl/SchemaExport.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ private void ExecuteInitialized(Action<string> scriptAction, bool execute, bool
190190
}
191191
catch (Exception e)
192192
{
193-
log.Warn("Unsuccessful: {0}", sql);
194-
log.Warn(e, e.Message);
193+
log.Warn(e, "Unsuccessful: {0}", sql);
195194
if (throwOnError)
196195
{
197196
throw;

0 commit comments

Comments
 (0)