|
|
@ -285,8 +285,8 @@ PLy_traceback(PyObject *e, PyObject *v, PyObject *tb, |
|
|
|
long plain_lineno; |
|
|
|
long plain_lineno; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* The second frame points at the internal function, but to mimic |
|
|
|
* The second frame points at the internal function, but to |
|
|
|
* Python error reporting we want to say <module>. |
|
|
|
* mimic Python error reporting we want to say <module>. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (*tb_depth == 1) |
|
|
|
if (*tb_depth == 1) |
|
|
|
fname = "<module>"; |
|
|
|
fname = "<module>"; |
|
|
@ -315,10 +315,10 @@ PLy_traceback(PyObject *e, PyObject *v, PyObject *tb, |
|
|
|
* If we know the current procedure, append the exact line |
|
|
|
* If we know the current procedure, append the exact line |
|
|
|
* from the source, again mimicking Python's traceback.py |
|
|
|
* from the source, again mimicking Python's traceback.py |
|
|
|
* module behavior. We could store the already line-split |
|
|
|
* module behavior. We could store the already line-split |
|
|
|
* source to avoid splitting it every time, but producing a |
|
|
|
* source to avoid splitting it every time, but producing |
|
|
|
* traceback is not the most important scenario to optimize |
|
|
|
* a traceback is not the most important scenario to |
|
|
|
* for. But we do not go as far as traceback.py in reading |
|
|
|
* optimize for. But we do not go as far as traceback.py |
|
|
|
* the source of imported modules. |
|
|
|
* in reading the source of imported modules. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
line = get_source_line(exec_ctx->curr_proc->src, plain_lineno); |
|
|
|
line = get_source_line(exec_ctx->curr_proc->src, plain_lineno); |
|
|
|
if (line) |
|
|
|
if (line) |
|
|
|