From 4796d1587b09cfeb410ccbe2351abcc5e519047e Mon Sep 17 00:00:00 2001 From: clerie Date: Thu, 16 Jun 2022 22:32:01 +0200 Subject: [PATCH] Improve exception message --- mitel_ommclient2/types/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitel_ommclient2/types/__init__.py b/mitel_ommclient2/types/__init__.py index c6041dc..dad1db1 100644 --- a/mitel_ommclient2/types/__init__.py +++ b/mitel_ommclient2/types/__init__.py @@ -44,7 +44,7 @@ def cast_dict_to_childtype(t, d): if t.FIELDS[k] is not None and type(v) != t.FIELDS[k]: d[k] = t.FIELDS[k](v) else: - raise KeyError() + raise KeyError("Key '{}' containing '{}' is unknown for {}".format(k, v, t.__name__)) return t(d)