From c7cffa36ad963ea8a70c522ae9f3d93037711979 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Feb 2009 15:48:44 -0400 Subject: If a sorting value can't be found, report an error --- src/compare.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compare.cc') diff --git a/src/compare.cc b/src/compare.cc index 5237fb9a..6b0cbe0d 100644 --- a/src/compare.cc +++ b/src/compare.cc @@ -54,6 +54,9 @@ namespace { sort_values.push_back(sort_value_t()); sort_values.back().inverted = inverted; sort_values.back().value = expr_t(node).calc(*scope).reduced(); + + if (sort_values.back().value.is_null()) + throw calc_error("Could not determine sorting value based an expression"); } } } -- cgit v1.2.3