internal void DispatchEvent(CorExceptionEventArgs ev) { // TODO What do we need here? Continue it true/false? //ev.Continue = false; OnException?.Invoke(ev); }
void ICorDebugManagedCallback.Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, int unhandled) { var ev = new CorExceptionEventArgs(new CorAppDomain(pAppDomain, p_options), new CorThread(pThread, p_options), unhandled); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
internal void DispatchEvent(CorExceptionEventArgs ev) { // stops executing by default (further handlers may change this) ev.Continue = false; // calls external handlers if (OnException != null) { OnException(ev); } }
void ICorDebugManagedCallback.Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, int unhandled) { var appDomain = GetCachedAppDomain(pAppDomain); pThread.GetCurrentException(out var currentException); var exception = new CorException(appDomain, currentException, p_options); var ev = new CorExceptionEventArgs(appDomain, exception, unhandled); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }