summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2009-05-18 21:14:54 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2009-05-18 21:14:54 (GMT)
commit61328eef1fdb8f8bb292e07839be55e917ae4f7a (patch)
tree5e89e77dc7d76a415de6a488b4af8a39dd2f5547 /Objects/frameobject.c
parentfceb5d478fcc43b764a9d1ad0a90e098828a7f64 (diff)
downloadcpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.zip
cpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.tar.gz
cpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.tar.bz2
While I was modifying test_trace, it threw an exception when I accidentally
made it try to set the line number from the trace callback for a 'call' event. This patch makes the error message a little more helpful in that case, and makes it a little less likely that a future editor will make the same mistake in test_trace.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 7a9d40d..5e54585 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -127,7 +127,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
if (!f->f_trace)
{
PyErr_Format(PyExc_ValueError,
- "f_lineno can only be set by a trace function");
+ "f_lineno can only be set by a"
+ " line trace function");
return -1;
}