From 2cba1407059049dfbcdb4bf164967aa62e9ee32a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 1 Jul 2019 16:17:09 -0700 Subject: converters: Improve exception string for illegal formats When trying to create a converter with an illegal string, it will now look like this: [convert] Cannot find an item size for: `???' --- host/lib/convert/convert_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/convert') diff --git a/host/lib/convert/convert_impl.cpp b/host/lib/convert/convert_impl.cpp index 99c1bf3c1..6385965f0 100644 --- a/host/lib/convert/convert_impl.cpp +++ b/host/lib/convert/convert_impl.cpp @@ -135,7 +135,7 @@ size_t convert::get_bytes_per_item(const std::string &format){ return get_bytes_per_item(format.substr(0, pos)); } - throw uhd::key_error("Cannot find an item size:\n" + format); + throw uhd::key_error("[convert] Cannot find an item size for: `" + format + "'"); } UHD_STATIC_BLOCK(convert_register_item_sizes){ -- cgit v1.2.3