Skip to content

Commit

Permalink
Let logger print error message
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Aug 13, 2019
1 parent d5408f9 commit ff9c258
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Libplanet/Net/Swarm.cs
Expand Up @@ -785,12 +785,15 @@ internal async Task SendMessageAsync(Peer peer, Message message)
}
catch (TimeoutException e)
{
_logger.Error(e, "Timeout occurred during SendMessageAsync()");
_logger.Error(e, "Timeout occurred during SendMessageAsync().");
throw;
}
catch (Exception e)
{
_logger.Error(e, "An unexpected exception occurred during SendMessageAsync()");
_logger.Error(
e,
"An unexpected exception occurred during SendMessageAsync(). {0}",
e);
throw;
}
}
Expand Down Expand Up @@ -873,7 +876,8 @@ internal async Task SendMessageAsync(Peer peer, Message message)
{
_logger.Error(
e,
"An unexpected exception occurred during SendMessageWithReplyAsync().");
"An unexpected exception occurred during SendMessageWithReplyAsync(). {0}",
e);
throw;
}
}
Expand Down

0 comments on commit ff9c258

Please sign in to comment.