mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
[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