+ debugging message
authorEric Prud'hommeaux <eric@w3.org>
Sun, 28 Feb 2010 09:09:00 -0500
changeset 181 4e52dade27c1
parent 180 f87818a1cb27
child 182 3a1ba6a4de3c
+ debugging message
src/main/scala/SparqlToSql.scala
--- a/src/main/scala/SparqlToSql.scala	Sat Feb 27 11:09:43 2010 -0500
+++ b/src/main/scala/SparqlToSql.scala	Sun Feb 28 09:09:00 2010 -0500
@@ -299,7 +299,11 @@
     }
   }
   def varToAttribute(varmap:Map[sparql.Var, SQL2RDFValueMapper], vvar:sparql.Var):sql.RelVarAttr = {
-    varmap(vvar) match {
+    val mapper = try { varmap(vvar) } catch {
+      case e:java.util.NoSuchElementException =>
+	throw new Exception("mapper for variable " + vvar + " not found in " + varmap)
+    }
+    mapper match {
       case IntMapper(binding) => bindingToAttribute(binding)
       case StringMapper(binding) => bindingToAttribute(binding)
       case DateMapper(binding) => bindingToAttribute(binding)