From f54d17c78766e1a25c7126fc6d881919bc3bc3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Sun, 6 Dec 2009 14:34:20 +0000 Subject: [PATCH] Fixed "Func eval cannot work. Bad starting point. (Exception from HRESULT: 0x80131313)" git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5294 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Debugger/Debugger.Core/Eval.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.Core/Eval.cs b/src/AddIns/Debugger/Debugger.Core/Eval.cs index 97f8537b57..319ef0a2fa 100644 --- a/src/AddIns/Debugger/Debugger.Core/Eval.cs +++ b/src/AddIns/Debugger/Debugger.Core/Eval.cs @@ -111,8 +111,16 @@ namespace Debugger } else if ((uint)e.ErrorCode == 0x80131C22) { // The operation is illegal because of a stack overflow. throw new GetValueException("Can not evaluate after stack overflow"); + } else if ((uint)e.ErrorCode == 0x80131313) { + // Func eval cannot work. Bad starting point. + // Reproduction circumstancess are unknown + throw new GetValueException("Func eval cannot work. Bad starting point."); } else { - throw; + #if DEBUG + throw; // Expose for more diagnostics + #else + throw new GetValueException(e.Message); + #endif } } @@ -228,8 +236,8 @@ namespace Debugger ); } - /// GetValueException. - static void MethodInvokeStarter(Eval eval, DebugMethodInfo method, Value thisValue, Value[] args) + /// GetValueException. + static void MethodInvokeStarter(Eval eval, DebugMethodInfo method, Value thisValue, Value[] args) { List corArgs = new List(); args = args ?? new Value[0];