--- 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)