Exemple #1
0
 int IDebugExceptionEvent2.GetException(EXCEPTION_INFO[] pExceptionInfo)
 {
     pExceptionInfo[0].bstrExceptionName = "squirrel exception";
     program.GetName(out pExceptionInfo[0].bstrProgramName);
     pExceptionInfo[0].dwCode   = 0x80000003;
     pExceptionInfo[0].dwState  = enum_EXCEPTION_STATE.EXCEPTION_CANNOT_BE_CONTINUED | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT;
     pExceptionInfo[0].pProgram = program;
     return(EngineConstants.S_OK);
 }
        public static string GetName(this IDebugProgram2 program)
        {
            Contract.Requires <ArgumentNullException>(program != null, "program");

            string name;

            ErrorHandler.ThrowOnFailure(program.GetName(out name));
            return(name);
        }
        public int GetException(EXCEPTION_INFO[] pExceptionInfo)
        {
            pExceptionInfo[0].pProgram          = _program;
            pExceptionInfo[0].bstrExceptionName = _exception.GetType().ToString();
            pExceptionInfo[0].dwState           = enum_EXCEPTION_STATE.EXCEPTION_CANNOT_BE_CONTINUED | enum_EXCEPTION_STATE.EXCEPTION_STOP_SECOND_CHANCE;
            pExceptionInfo[0].guidType          = new Guid(GuidList.PowerShellLanguage);

            string name;

            _program.GetName(out name);

            pExceptionInfo[0].bstrProgramName = name;

            return(VSConstants.S_OK);
        }
Exemple #4
0
 int IDebugProgram3.GetName(out string pbstrName)
 {
     return(IDebugProgram2.GetName(out pbstrName));
 }