[Swift-commit] r2474 - trunk/src/org/griphyn/vdl/engine

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Jan 29 08:26:50 CST 2009


Author: benc
Date: 2009-01-29 08:26:47 -0600 (Thu, 29 Jan 2009)
New Revision: 2474

Modified:
   trunk/src/org/griphyn/vdl/engine/Karajan.java
Log:
fix null pointer exception when trying to typecheck an @function that does not exist - now give a proper compilation error

Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java
===================================================================
--- trunk/src/org/griphyn/vdl/engine/Karajan.java	2009-01-29 14:09:05 UTC (rev 2473)
+++ trunk/src/org/griphyn/vdl/engine/Karajan.java	2009-01-29 14:26:47 UTC (rev 2474)
@@ -808,7 +808,9 @@
 		StringTemplate funcST = template("function");
 		funcST.setAttribute("name", func.getName());
 		ProcedureSignature funcSignature =  (ProcedureSignature) functionsMap.get(func.getName()); 
-		
+		if(funcSignature == null) {
+			throw new CompilationException("Unknown function "+func.getName());
+		}
 		XmlObject[] arguments = func.getAbstractExpressionArray();
 		int noOfOptInArgs = 0;
 		for (int i = 0; i < funcSignature.sizeOfInputArray(); i++) {




More information about the Swift-commit mailing list