From 6a4e0bd43a82797a00b35006b4fee683bfba745c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Kartnaller?= Date: Wed, 2 Feb 2011 22:43:20 +0100 Subject: [PATCH] log a traceback only once --- Objective-J/Debug.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Objective-J/Debug.js b/Objective-J/Debug.js index 1df4bd179..b6f51acb9 100644 --- a/Objective-J/Debug.js +++ b/Objective-J/Debug.js @@ -102,10 +102,13 @@ GLOBAL(objj_backtrace_decorator) = function(msgSend) } catch (anException) { - // print the exception and backtrace - CPLog.warn("Exception " + anException + " in " + objj_debug_message_format(aReceiver, aSelector)); - objj_backtrace_print(CPLog.warn); - + if (objj_backtrace.length) + { + // print the exception and backtrace + CPLog.warn("Exception " + anException + " in " + objj_debug_message_format(aReceiver, aSelector)); + objj_backtrace_print(CPLog.warn); + objj_backtrace = []; + } // re-throw the exception throw anException; }