private String tracebackInfo() { if (tb_frame == null || tb_frame.f_code == null) { return String.format(" (no code object) at line %s\n", tb_lineno); } String line = null; if (tb_frame.f_code.co_filename != null) { line = getLine(tb_frame.f_code.co_filename, tb_lineno); } return String.format(" File \"%.500s\", line %d, in %.500s\n%s", tb_frame.f_code.co_filename, tb_lineno, tb_frame.f_code.co_name, line == null ? "" : " " + line); }