# HG changeset patch # User moel.mich # Date 1370808680 0 # Node ID 1201889d413a8744c7649212cae87e8be251a25a # Parent c540cf36b7ce1d17a251a9d309903ec59c0f7b65 Added code to handle exceptions when creating the report for drives that are no longer available/ready. diff -r c540cf36b7ce -r 1201889d413a Hardware/HDD/AbstractHarddrive.cs --- a/Hardware/HDD/AbstractHarddrive.cs Sun Jun 09 19:57:00 2013 +0000 +++ b/Hardware/HDD/AbstractHarddrive.cs Sun Jun 09 20:11:20 2013 +0000 @@ -317,11 +317,15 @@ } foreach (DriveInfo di in driveInfos) { - r.AppendLine("Logical drive name: " + di.Name); - r.AppendLine("Format: " + di.DriveFormat); - r.AppendLine("Total size: " + di.TotalSize); - r.AppendLine("Total free space: " + di.TotalFreeSpace); - r.AppendLine(); + if (!di.IsReady) + continue; + try { + r.AppendLine("Logical drive name: " + di.Name); + r.AppendLine("Format: " + di.DriveFormat); + r.AppendLine("Total size: " + di.TotalSize); + r.AppendLine("Total free space: " + di.TotalFreeSpace); + r.AppendLine(); + } catch (IOException) { } catch (UnauthorizedAccessException) { } } return r.ToString(); diff -r c540cf36b7ce -r 1201889d413a Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Sun Jun 09 19:57:00 2013 +0000 +++ b/Properties/AssemblyVersion.cs Sun Jun 09 20:11:20 2013 +0000 @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.5.1.15")] -[assembly: AssemblyInformationalVersion("0.5.1.15 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.1.16")] +[assembly: AssemblyInformationalVersion("0.5.1.16 Alpha")] \ No newline at end of file