Added global exception handling for T-Balancer detection (to handle ArgumentException if portName does not exist).

This commit is contained in:
Michael Möller 2010-02-18 14:03:02 +00:00
parent d656d7558b
commit fd6d92b845
2 changed files with 5 additions and 7 deletions

View File

@ -119,11 +119,9 @@ namespace OpenHardwareMonitor.Hardware.TBalancer {
hardware.Add(new TBalancer(portNames[i], protocolVersion)); hardware.Add(new TBalancer(portNames[i], protocolVersion));
return; return;
} }
} catch (IOException ioe) { } catch (Exception e) {
report.AppendLine(ioe.ToString()); report.AppendLine(e.ToString());
} catch (NullReferenceException ne) { }
report.AppendLine(ne.ToString());
}
report.AppendLine(); report.AppendLine();
} }
} }

View File

@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.21.2")] [assembly: AssemblyVersion("0.1.21.3")]
[assembly: AssemblyFileVersion("0.1.21.2")] [assembly: AssemblyFileVersion("0.1.21.3")]