summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/value.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/value.cc b/src/value.cc
index c7cc77c8..4b9f5756 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -211,18 +211,16 @@ value_t::operator bool() const
return as_balance_pair();
case STRING:
return ! as_string().empty();
- case MASK:
- return ! as_mask().empty();
case SEQUENCE:
return ! as_sequence().empty();
case POINTER:
return ! as_any_pointer().empty();
default:
- assert(false);
break;
}
- assert(false);
- return 0;
+
+ throw_(value_error, "Cannot determine truth of " << label());
+ return false;
}
bool value_t::to_boolean() const