diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-03 15:19:02 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-03 15:19:02 +0000 |
commit | c1cede59da577c6f081227cb0daaff632307952c (patch) | |
tree | 8a025863254b39664aa48e9eb1850b241d7dbde1 /eval | |
parent | ef0bb7481928dbd55104598e51dd268e44cd520e (diff) |
Add information about the incorrect spec causing the error.
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/vespa/eval/eval/value_codec.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/eval/src/vespa/eval/eval/value_codec.cpp b/eval/src/vespa/eval/eval/value_codec.cpp index d5fc2eb7c16..19cf2012bcb 100644 --- a/eval/src/vespa/eval/eval/value_codec.cpp +++ b/eval/src/vespa/eval/eval/value_codec.cpp @@ -335,7 +335,9 @@ std::unique_ptr<Value> decode_value(nbostream &input, const ValueBuilderFactory std::unique_ptr<Value> value_from_spec(const TensorSpec &spec, const ValueBuilderFactory &factory) { ValueType type = ValueType::from_spec(spec.type()); - assert(!type.is_error()); + if (type.is_error()) { + throw IllegalArgumentException(fmt("Failed decoding value type from tensorspec(%s)", spec.type().c_str()), VESPA_STRLOC); + } return typify_invoke<1,TypifyCellType,CreateValueFromTensorSpec>(type.cell_type(), type, spec, factory); } |