[cooja] VarMemory: Actually throw UnknownVariableException
This commit is contained in:
parent
0f2837320c
commit
b9ac2953b7
1 changed files with 5 additions and 1 deletions
|
@ -99,7 +99,11 @@ public class VarMemory extends Memory {
|
|||
* @return Variable address
|
||||
*/
|
||||
public Symbol getVariable(String varName) throws UnknownVariableException {
|
||||
return memIntf.getSymbolMap().get(varName);
|
||||
Symbol sym = memIntf.getSymbolMap().get(varName);
|
||||
if (sym == null) {
|
||||
throw new UnknownVariableException(varName);
|
||||
}
|
||||
return sym;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue