Skip to content
Snippets Groups Projects
Commit 19c327a5 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Yet more robustness when describing backtraces.

Rev: lib/master.pike.in:1.108
parent 70608dde
No related branches found
No related tags found
No related merge requests found
/* -*- Pike -*- /* -*- Pike -*-
* *
* $Id: master.pike.in,v 1.107 2000/03/25 21:28:37 hubbe Exp $ * $Id: master.pike.in,v 1.108 2000/03/26 15:11:34 mast Exp $
* *
* Master-file for Pike. * Master-file for Pike.
* *
...@@ -1331,8 +1331,13 @@ string stupid_describe(mixed m, int maxlen) ...@@ -1331,8 +1331,13 @@ string stupid_describe(mixed m, int maxlen)
if(string tmp=describe_program(m)) return tmp; if(string tmp=describe_program(m)) return tmp;
if(object o=function_object(m)) if(object o=function_object(m))
return (describe_object(o)||"")+"->"+function_name(m); return (describe_object(o)||"")+"->"+function_name(m);
else else {
return function_name(m) || "function"; string tmp;
if (catch (tmp = function_name(m)))
// The function object has probably been destructed.
return "function";
return tmp || "function";
}
case "program": case "program":
if(string tmp=describe_program(m)) return tmp; if(string tmp=describe_program(m)) return tmp;
...@@ -1585,7 +1590,7 @@ string describe_backtrace(mixed trace, void|int linewidth) ...@@ -1585,7 +1590,7 @@ string describe_backtrace(mixed trace, void|int linewidth)
} }
} }
}) { }) {
row += sprintf("Error indexing backtrace line %d (%O)!", e, err[1]); row += sprintf("Error indexing backtrace line %d: %s (%O)!", e, err[0], err[1]);
} }
ret += row + "\n"; ret += row + "\n";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment