Add exception message to log.

Output will be something line: `Failed to bind to port 1900: Address already in use. DLNA will be unavailable`
This commit is contained in:
Bond-009 2019-01-13 01:30:43 +01:00 committed by Bond_009
parent 783e74d9c9
commit 81475e361b
1 changed files with 2 additions and 2 deletions

View File

@ -126,9 +126,9 @@ namespace Rssdp.Infrastructure
{ {
_BroadcastListenSocket = ListenForBroadcastsAsync(); _BroadcastListenSocket = ListenForBroadcastsAsync();
} }
catch (SocketException) catch (SocketException ex)
{ {
_logger.LogError("Failed to bind to port 1900. DLNA will be unavailable"); _logger.LogError("Failed to bind to port 1900: {Message}. DLNA will be unavailable", ex.Message);
} }
catch (Exception ex) catch (Exception ex)
{ {