/// <summary> /// Specifies how the debug engine (DE) should handle a given exception. /// </summary> public int SetException(EXCEPTION_INFO[] pException) { DLog.Debug(DContext.VSDebuggerComCall, "IDebugEngine2.SetException"); var copyToProgram = false; foreach (var info in pException) { if (info.guidType == GuidList.Guids.guidDot42DebuggerId) { if (info.bstrExceptionName == ExceptionConstants.TopLevelName) { exceptionBehaviorMap.DefaultStopOnThrow = info.dwState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE); exceptionBehaviorMap.DefaultStopUncaught = info.dwState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT); copyToProgram = true; } else { var behavior = new ExceptionBehavior( info.bstrExceptionName, info.dwState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE), info.dwState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT)); exceptionBehaviorMap[info.bstrExceptionName] = behavior; copyToProgram = true; } } } if (copyToProgram) { CopyExceptionMapToProgram(); } return VSConstants.S_OK; }
private bool Equals(ExceptionBehavior other) { return string.Equals(ExceptionName, other.ExceptionName) && StopOnThrow == other.StopOnThrow && StopUncaught == other.StopUncaught; }
private bool Equals(ExceptionBehavior other) { return(string.Equals(ExceptionName, other.ExceptionName) && StopOnThrow == other.StopOnThrow && StopUncaught == other.StopUncaught); }