From 8d05f56765f7afac567300568d0bac01cd8a21df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Fri, 13 Nov 2009 15:53:09 +0000 Subject: [PATCH] Minor update to last revision git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5253 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs index 5ae4b243c5..ef83a76d63 100644 --- a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs +++ b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs @@ -490,9 +490,8 @@ namespace Debugger // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); - if (process.SelectedThread.CurrentExceptionIsUnhandled || process.PauseOnHandledException) { - process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException())); - process.SelectedThread.CurrentException.MakeValuePermanent(); + if ((ExceptionType)exceptionType == ExceptionType.Unhandled || process.PauseOnHandledException) { + process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference()); process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState; process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType; process.SelectedThread.CurrentExceptionIsUnhandled = (ExceptionType)exceptionType == ExceptionType.Unhandled;