Changeset 2670


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

When we are trying to delete a "corrupt" report, handle an UnauthorizedAccessException? since we have users who run Eraser as another user. In this situation, the current user does not have permissions to access the report, so just raise an exception that the report is invalid. When an appropriate user is running, we'll prompt them again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.BlackBox/BlackBoxReport.cs

    r2669 r2670  
    4848            if (!File.Exists(stackTracePath)) 
    4949            { 
    50                 Delete(); 
     50                try 
     51                { 
     52                    Delete(); 
     53                } 
     54                catch (UnauthorizedAccessException) 
     55                { 
     56                    //Swallow. We may not be able to access the report; let the user 
     57                    //who owns the report upload it. But in this case, we still need 
     58                    //to still raise InvalidDataException otherwise we will operate 
     59                    //on a report we cannot modify. 
     60                } 
     61 
    5162                throw new InvalidDataException("The BlackBox report is corrupt."); 
    5263            } 
Note: See TracChangeset for help on using the changeset viewer.