From da4232d08f0fdc5cf17045ab3839fae2065aaade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Mon, 26 Jul 2010 17:06:22 +0000 Subject: [PATCH] Fixed Forum-31266: Intercepting FileIOPermission deny exception. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6254 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Debugger/Debugger.Core/Thread.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AddIns/Debugger/Debugger.Core/Thread.cs b/src/AddIns/Debugger/Debugger.Core/Thread.cs index 234ff9dfc7..a022ea554d 100644 --- a/src/AddIns/Debugger/Debugger.Core/Thread.cs +++ b/src/AddIns/Debugger/Debugger.Core/Thread.cs @@ -223,6 +223,10 @@ namespace Debugger // 0x80131C33: Interception of the current exception is not legal if ((uint)e.ErrorCode == 0x80131C33) return false; + // 0x80004005: Error HRESULT E_FAIL has been returned from a call to a COM component. + // Use this to reproduce: new FileIOPermission(PermissionState.Unrestricted).Deny(); + if ((uint)e.ErrorCode == 0x80004005) + return false; throw; } catch (ArgumentException) { // May happen in release code with does not have any symbols