Changeset 2642


Ignore:
Timestamp:
5/22/2012 8:57:24 AM (2 years ago)
Author:
lowjoel
Message:

Don't crash if the drive does not collect performance statistics.

Location:
trunk/eraser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.DefaultPlugins/EntropySources/KernelEntropySource.cs

    r2639 r2642  
    206206                    //This happens if a drive is ejected while the loop is running. 
    207207                } 
     208                catch (NotSupportedException) 
     209                { 
     210                    //Don't bother if this drive doesn't count statistics. 
     211                } 
    208212            } 
    209213 
  • trunk/eraser/Eraser.Util/Win32ErrorCodes.cs

    r2516 r2642  
    6767                case RequestAborted:    return new OperationCanceledException(); 
    6868                case SharingViolation:  return new SharingViolationException(); 
     69                case BadCommand:        return new NotSupportedException(); 
    6970            } 
    7071 
     
    9697        public const int RequestAborted = 1235; 
    9798        public const int NotAReparsePoint = 4390; 
     99        public const int BadCommand = 22; 
    98100    } 
    99101} 
Note: See TracChangeset for help on using the changeset viewer.