From 2f38f1e73e86da2f7e674842ea6f97db682bf4ea Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Wed, 26 Apr 2017 15:17:02 -0700 Subject: [PATCH] Pre: Make it easier to debug binding errors. --- query-projector/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query-projector/src/lib.rs b/query-projector/src/lib.rs index 358667e5..64988b19 100644 --- a/query-projector/src/lib.rs +++ b/query-projector/src/lib.rs @@ -164,7 +164,7 @@ fn candidate_column(query: &AlgebraicQuery, var: &Variable) -> (ColumnOrExpressi let columns = query.cc .column_bindings .get(var) - .expect("Every variable has a binding"); + .expect(format!("Every variable should have a binding, but {:?} does not", var).as_str()); let qa = columns[0].clone(); let name = VariableColumn::Variable(var.clone()).column_name(); @@ -496,4 +496,4 @@ pub fn query_projection(query: &AlgebraicQuery) -> CombinedProjection { }, } } -} \ No newline at end of file +}