diff --git a/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs b/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs index c8db2153e9..2b1ef47929 100644 --- a/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs +++ b/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs @@ -127,18 +127,20 @@ namespace Debugger void BeforeGetValue(string name) { // PrintLine("BeforeGetValue: " + name); - Variable localVar = debugger.LocalVariables[name]; - if (localVar != null) { + try { + Variable localVar = debugger.LocalVariables[name]; PrintLine("Warning: 'Getting of local variables not implemented'"); + } catch (DebuggerException) { } } void AfterSetValue(string name) { //PrintLine("AfterSetValue: " + name); - Variable localVar = debugger.LocalVariables[name]; - if (localVar != null) { + try { + Variable localVar = debugger.LocalVariables[name]; PrintLine("Warning: 'Setting of local variables not implemented'"); + } catch (DebuggerException) { } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs index 589ca77449..5da9d6e005 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs @@ -102,7 +102,7 @@ namespace Debugger if (v.Name == variableName) return v; } } - return null; + throw new DebuggerException("Variable \"" + variableName + "\" is not in collection"); } }