Browse Source

Propagate errors from VariableCollection indexer by exception

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1640 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
05e9a81d25
  1. 10
      src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs
  2. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

10
src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs

@ -127,18 +127,20 @@ namespace Debugger @@ -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) {
}
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

@ -102,7 +102,7 @@ namespace Debugger @@ -102,7 +102,7 @@ namespace Debugger
if (v.Name == variableName) return v;
}
}
return null;
throw new DebuggerException("Variable \"" + variableName + "\" is not in collection");
}
}

Loading…
Cancel
Save