From 025afe064401dba02dd70cf3daa1b94d52966aa8 Mon Sep 17 00:00:00 2001 From: Timo Korvola Date: Mon, 30 Jan 2017 17:58:18 +0200 Subject: [PATCH] Print exception type name if we can't get a traceback. Also decref PyErr_Fetch results. Change-Id: I3e497d6750b08e24a9631c83a2b6e0e3c1502d79 --- .../jnipython.dll | Bin 63488 -> 63488 bytes .../src/sclpy.c | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/org.simantics.pythonlink.win32.x86_64/jnipython.dll b/org.simantics.pythonlink.win32.x86_64/jnipython.dll index 261bac38ed2f79d35f1a626e8e57ccc00aa9a418..dbf7cb48d649a3aaa80feed808f69ac92e32458a 100644 GIT binary patch delta 2424 zcmZuyeN5D49DnXO7K*dAH z_Sn*v;PHA;D0scNrbg3-R=%u1S~(l`NAB!eyXn@LT2G(n`Tc%yMr`+ee?Fh@_j$f| zGz3B#0wL{zkn@|{NA5?37=JCK;ig#QrebO}ElbGGBIIt{EQql6qFmZyiVgcK7q&Z(4w*8Hu55bW6q{DNkr(Deq$fi>WryfVfp}pC#DiBLk}VK1 zoXNig;!ZY1qr+MLt&2M$}lTRYqR+*0bbKNp^5WJjw(VfTNF=A!1PBb zheO>hoL3ESGM-ReoQx3P@y{6Jh_&?HtPP>us;1*vx%GcH2NnJDsajOQVQz3*aH*Oo z>@o)vUaMg;(UeM@Mt|g_@3KjH8FN^ZMq5T}hWrbZ!}7UcBBw^A)N`hvv;ny$&U}s~ zLP*`_Dfp_^n-HGbgfN4ePz%*2xUDxaC|YUbgBNm6A9A?VdSPg!B8FUm=Rm4zom6-# zsW5{`)k2k&+y6sa#z`ksQlVAOdNqa|5wE3dom50sQeg&>ss~h3ZvTgr$tMQYF|-xT z#OSGyFCihxtlbgHZ=%lZAkOfyX7e0C@jw48&EY;SgU6M|OMJ;M($u`futT7fqX+3N zhZ6U}87vM~KE^*6Pkm+|C(bn6d~t}2i$BKX9y**8Nz1b1W4cDv>UdscWwLXC*XNnx zUuJT;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r(x^nBrlphR>~yw-*Lf00&|WC`u~K$uw4MX#1* zF8ZlIwCDPF0zJQlEb?XdG4b!Sh@D5ZrOCo$>^Bp?JWESUla+JNP+RH7ge#p03f$HZ zSEg?3!%q5psUcy1sLQtLF1k*-t}Juk_gGs}v(6tIH6m}Ze_{!kSg&lDHZgaHe1$V_ z;r7E3?M?D8#f^{yfgcFm1%tpZZN(XSuS{!Li*!t6GL!~QE1dWjWZ(%5emivh;^iOB zeI(@P64xar-szw@<)YGXi0&@0dSN|3wU6;%uMLSj|2XLV@)qUC9ZqY-oml5sMXSPT ztUjEfh;&|ew1q1cIE#iqSva#Q@xZR?>K%J_5vS@0>x>Vyg0uE#bJ)?-WrUco5i$&3 zSWZYWtp_name + : "Internal error, null exception type"); } Py_DECREF(args); Py_DECREF(formatExc); @@ -900,6 +904,9 @@ Java_org_simantics_pythonlink_PythonContext_executePythonStatementImpl( throwPythonException(env, "Internal error, no traceback module"); } } + Py_XDECREF(exceptionType); + Py_XDECREF(exception); + Py_XDECREF(traceback); } PyEval_SaveThread(); -- 2.47.1