mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 00:10:27 +00:00
Remove annoying (fiber) text from stacktrace.
This commit is contained in:
parent
192705113e
commit
e53778d5d8
@ -1475,7 +1475,6 @@ value, one key will be ignored."
|
||||
(when f
|
||||
(loop
|
||||
[nf :in (reverse (debug/lineage f))
|
||||
:before (file/write stderr " (fiber)\n")
|
||||
{:function func
|
||||
:tail tail
|
||||
:pc pc
|
||||
@ -1484,7 +1483,7 @@ value, one key will be ignored."
|
||||
:source source
|
||||
:source-start start
|
||||
:source-end end} :in (debug/stack nf)]
|
||||
(file/write stderr " in")
|
||||
(file/write stderr " in")
|
||||
(when c (file/write stderr " cfunction"))
|
||||
(if name
|
||||
(file/write stderr " " name)
|
||||
|
@ -39,12 +39,11 @@ void janet_stacktrace(JanetFiber *fiber, const char *errtype, Janet err) {
|
||||
for (fi = janet_v_count(fibers) - 1; fi >= 0; fi--) {
|
||||
fiber = fibers[fi];
|
||||
int32_t i = fiber->frame;
|
||||
if (i > 0) fprintf(stderr, " (fiber)\n");
|
||||
while (i > 0) {
|
||||
JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
|
||||
JanetFuncDef *def = NULL;
|
||||
i = frame->prevframe;
|
||||
fprintf(stderr, " in");
|
||||
fprintf(stderr, " in");
|
||||
if (frame->func) {
|
||||
def = frame->func->def;
|
||||
fprintf(stderr, " %s", def->name ? (const char *)def->name : "<anonymous>");
|
||||
|
Loading…
Reference in New Issue
Block a user