commit | c2d2fa71c43e5583826902b7e74e440bd6be0008 | [log] [tgz] |
---|---|---|
author | ramangrover29 <ramangrover29@gmail.com> | Sun May 19 16:39:25 2013 -0700 |
committer | ramangrover29 <ramangrover29@gmail.com> | Sun May 19 16:39:25 2013 -0700 |
tree | 22bb4fc69b92f916e785d05227356822a01d13fb | |
parent | 4d9b5dccbfc9e17fb38346d56dc96ea3140f74a5 [diff] |
Added error message to substitue for an NPE
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java index 6f834a7..bb4526c 100644 --- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java +++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java
@@ -37,6 +37,10 @@ @Override public synchronized IFunctionDescriptor lookupFunction(FunctionIdentifier fid) throws AlgebricksException { Pair<FunctionIdentifier, Integer> key = new Pair<FunctionIdentifier, Integer>(fid, fid.getArity()); + IFunctionDescriptorFactory factory = functions.get(key); + if (factory == null) { + throw new AlgebricksException("Inappropriate use of function " + "'" + fid.getName() + "'"); + } return functions.get(key).createFunctionDescriptor(); }