@verb #12:"handle_uncaught_error" this none this rxdo #789 @program #12:"handle_uncaught_error" this none this "Record the TB for later viewing by @last-tb" "Improved to allow viewing of multiple Tb's by Quadir (#9780)" "Improved to display a more appropriate traceback for non-technically minded people by Absolute(#7153), original concept done by Quadir (#9780)" caller_perms():controls(this) || raise(E_PERM) if (typeof(this.last_tb) != LIST || length(this.last_tb) != 2 || typeof(this.last_tb[1]) != INT || typeof(this.last_tb[2]) != $LIST) this.last_tb = {3, {}} endif this.last_tb[2] = {@this.last_tb[2], {args[$], time()}} if (length(this.last_tb[2]) > this.last_tb[1]) "Clear away old tb's" this.last_tb[2] = this.last_tb[2][$ - this.last_tb[1] + 1..$] endif if (!this:display_option("show_tbs")) {code, msg, value, traceback, formatted} = args "... Display the proper code for the error generated, not the message associated it with the code ... " line = toliteral(code) for x in (traceback) " ... Append every trace of the error back to the source ..." line = tostr(x[4], ":", x[2], ", line ", x[6], " -> ") + line endfor player:notify(tostr("Oops! An error of '", msg ? msg | code, "' has occured while executing '", traceback[$][2], "'.")) player:notify(tostr("Please inform ", $su:nn(traceback[1][3]), " of the following: ", line)) return 1 else " ... Seems they want the full error ... " pass(@args) endif "Last modified by Dax (#789) on Wed May 4 06:46:00 2005 MDT." .