From ae4f943e2be34498a1041119d1b2b3cc0b926f06 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 3 Dec 2008 22:07:12 +0100 Subject: [PATCH] better exception message for temp failure tracking --- Cython/Compiler/ExprNodes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 4153073e..f3f4a396 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -638,7 +638,12 @@ class NewTempExprNode(ExprNode): def release_temp_result(self, code): if not self.temp_code: - raise RuntimeError("No temp (perhaps released multiple times? See self.old_temp)") + if self.old_temp: + raise RuntimeError("temp %s released multiple times in %s" % ( + self.old_temp, self.__class__.__name__)) + else: + raise RuntimeError("no temp, but release requested in %s" % ( + self.__class__.__name__)) code.funcstate.release_temp(self.temp_code) self.old_temp = self.temp_code self.temp_code = None -- 2.26.2