- Timestamp:
- 1/27/2010 5:58:28 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview/Eraser.Util/Win32ErrorCodes.cs
r1701 r1705 25 25 using System.Runtime.InteropServices; 26 26 using System.IO; 27 using System.ComponentModel; 27 28 28 29 namespace Eraser.Util … … 53 54 case NoError: return null; 54 55 case SharingViolation: return new IOException(); 56 } 55 57 56 default: 57 int HR = GetHRForWin32Error(errorCode); 58 return Marshal.GetExceptionForHR(HR); 59 } 58 int HR = GetHRForWin32Error(errorCode); 59 Exception exception = Marshal.GetExceptionForHR(HR); 60 if (exception.GetType() == typeof(COMException)) 61 throw new Win32Exception(errorCode); 62 else 63 throw exception; 60 64 } 61 65
Note: See TracChangeset
for help on using the changeset viewer.
