Ignore:
Timestamp:
2/8/2010 7:09:55 AM (2 years ago)
Author:
lowjoel
Message:

Do not localise exceptions which aren't meant to be seen by the user. User-visible exceptions will be dealt with in a separate ticket. Do not throw exceptions to indicate handleable errors (notably, when erasing unused space without administrator permissions) Addresses #275: Code Review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview/Eraser.Manager/Method.cs

    r1681 r1767  
    378378            public override long CalculateEraseDataSize(ICollection<string> paths, long targetSize) 
    379379            { 
    380                 throw new InvalidOperationException(S._("The DefaultMethod class should never " + 
    381                     "be used and should instead be replaced before execution!")); 
     380                throw new InvalidOperationException("The DefaultMethod class should never " + 
     381                    "be used and should instead be replaced before execution!"); 
    382382            } 
    383383 
     
    385385                ErasureMethodProgressFunction callback) 
    386386            { 
    387                 throw new InvalidOperationException(S._("The DefaultMethod class should never " + 
    388                     "be used and should instead be replaced before execution!")); 
     387                throw new InvalidOperationException("The DefaultMethod class should never " + 
     388                    "be used and should instead be replaced before execution!"); 
    389389            } 
    390390        } 
     
    473473            //Check for a valid constructor. 
    474474            if (ctor == null) 
    475                 throw new ArgumentException(S._("Registered erasure methods must contain " + 
     475                throw new ArgumentException("Registered erasure methods must contain " + 
    476476                    "a parameterless constructor that is called whenever clients request " + 
    477477                    "for an instance of the method. If a constructor requires parameters, " + 
    478                     "specify it in the parameters parameter.")); 
     478                    "specify it in the parameters parameter."); 
    479479 
    480480            //Insert the entry 
     
    498498        { 
    499499            if (!ManagerLibrary.Instance.ErasureMethodManager.methods.ContainsKey(value)) 
    500                 throw new ArgumentException(S._("The GUID of the erasure method to remove " + 
    501                     "refers to an invalid erasure method.")); 
     500                throw new ArgumentException("The GUID of the erasure method to remove " + 
     501                    "refers to an invalid erasure method."); 
    502502 
    503503            ManagerLibrary.Instance.ErasureMethodManager.methods.Remove(value); 
Note: See TracChangeset for help on using the changeset viewer.