From ea15fc51b4088324198c7d6773df5db509ba2ccc Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 21 May 2020 17:50:56 -0700 Subject: [PATCH] Stop printing full backtrace when light data lambda fails Since this occurs naturally for 2 blocks, the backtrace is just noise. --- burger/toppings/blocks.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/burger/toppings/blocks.py b/burger/toppings/blocks.py index 8330d895..866c229d 100644 --- a/burger/toppings/blocks.py +++ b/burger/toppings/blocks.py @@ -27,7 +27,6 @@ from jawa.util.descriptor import method_descriptor from burger.util import WalkerCallback, walk_method, try_eval_lambda -import traceback import six.moves @@ -268,10 +267,9 @@ def on_invokedynamic(self, ins, const, args): try: args.append(object()) # The state that the lambda gets return try_eval_lambda(ins, args, lcf) - except: + except Exception as ex: if verbose: - print("Failed to call lambda") - traceback.print_exc() + print("Failed to call lambda for light data:", ex) return None else: return object()