[cooja] VarMemory: Actually throw UnknownVariableException
This commit is contained in:
parent
0f2837320c
commit
b9ac2953b7
@ -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 New Issue
Block a user