diff options
author | Artem Bukhonov <artem.bukhonov@jetbrains.com> | 2017-01-28 00:16:13 +0300 |
---|---|---|
committer | Artem Bukhonov <Artem.Bukhonov@jetbrains.com> | 2017-03-11 21:20:11 +0300 |
commit | 92fd2c95f0406802d65d5c8072693139e38b8829 (patch) | |
tree | caf7436f06d879f0f75dc93227b41bd46e7a65aa /main/src/addins/MonoDevelop.Debugger.Win32 | |
parent | e5e2c844b3d1c4f197dd609d4bff8e0fd27043e1 (diff) |
Silently and properly handle COMException in GetThisReference and GetHoistedReference
(cherry picked from commit b3b45f2)
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.Win32')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs index f43c6d913d..fbabdc3902 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs @@ -43,6 +43,7 @@ using CorElementType = Microsoft.Samples.Debugging.CorDebug.NativeApi.CorElement using Microsoft.Samples.Debugging.Extensions;
using System.Linq;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
namespace Mono.Debugging.Win32
{
@@ -1369,7 +1370,8 @@ namespace Mono.Debugging.Win32 });
var type = (CorType) GetValueType (cx, vref);
return GetHoistedThisReference (cx, type, vref);
- } catch (Exception) {
+ } catch (COMException e) {
+ DebuggerLoggingService.LogMessage ("Exception in GetHoistedThisReference(): {0}", e.Message);
}
return null;
}
@@ -1458,8 +1460,8 @@ namespace Mono.Debugging.Win32 });
return new VariableReference (ctx, vref, "this", ObjectValueFlags.Variable | ObjectValueFlags.ReadOnly);
- } catch (Exception e) {
- ctx.WriteDebuggerError (e);
+ } catch (COMException e) {
+ DebuggerLoggingService.LogMessage("Exception in GetThisReference(): {0}", e.Message);
return null;
}
}
|