Przeglądaj źródła

Log exception where possible

Bond_009 6 lat temu
rodzic
commit
cb8cd1ff55

+ 2 - 6
Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs

@@ -146,14 +146,10 @@ namespace IsoMounter
 
         public Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken)
         {
-            LinuxMount mountedISO;
-
-            if (MountISO(isoPath, out mountedISO))
-            {
+            if (MountISO(isoPath, out LinuxMount mountedISO)) {
                 return Task.FromResult<IIsoMount>(mountedISO);
             }
-            else
-            {
+            else {
                 throw new IOException(String.Format(
                     "An error occurred trying to mount image [$0].",
                     isoPath

+ 7 - 2
RSSDP/SsdpDevicePublisher.cs

@@ -310,11 +310,16 @@ namespace Rssdp.Infrastructure
 
             try
             {
-                await _CommsServer.SendMessage(System.Text.Encoding.UTF8.GetBytes(message), endPoint, receivedOnlocalIpAddress, cancellationToken).ConfigureAwait(false);
+                await _CommsServer.SendMessage(
+                        System.Text.Encoding.UTF8.GetBytes(message),
+                        endPoint,
+                        receivedOnlocalIpAddress,
+                        cancellationToken)
+                    .ConfigureAwait(false);
             }
             catch (Exception)
             {
-                
+
             }
 
             //WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device);