From 907dd88ceb10229eb4eb4231465fd3e9ff31077f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 28 Mar 2019 09:32:09 -0400 Subject: [PATCH] msgproto: Propagate original error message in create_command() Signed-off-by: Kevin O'Connor --- klippy/msgproto.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/klippy/msgproto.py b/klippy/msgproto.py index 41f0a11b..a26bfbc4 100644 --- a/klippy/msgproto.py +++ b/klippy/msgproto.py @@ -321,11 +321,15 @@ class MessageParser: else: tval = value argparts[name] = tval + except error as e: + raise except: #logging.exception("Unable to extract params") raise error("Unable to extract params from: %s" % (msgname,)) try: cmd = mp.encode_by_name(**argparts) + except error as e: + raise except: #logging.exception("Unable to encode") raise error("Unable to encode: %s" % (msgname,))