Differences From Artifact [2827b7df74d1df19]:
- File
polemy/failure.d
- 2010-11-24 13:22:04 - part of checkin [f9c31f3cd8] on branch trunk - Fixed the null dereference bug when directly wrote "case 1 when 2: 3" in REPL. It was due to null LexPosition in the AST. Now AST.pos !is null is an invariant of AST. (user: kinaba) [annotate]
To Artifact [442c0afd591f3c6a]:
- File
polemy/failure.d
- 2010-11-24 17:44:58 - part of checkin [b993a8ad16] on branch trunk - auto memo and re-run feature of non @value/@macro layers re-re-re-implemented. (user: kinaba) [annotate]
49 49 template ExceptionWithPosition()
50 50 {
51 51 LexPosition pos;
52 52 this( LexPosition pos, string msg, string file=null, size_t line=0, Throwable next=null )
53 53 {
54 54 string fullmsg = pos is null ? sprintf!("\n[??] %s")(msg)
55 55 : sprintf!("\n[%s] %s")(pos, msg);
56 - for(int i=0; i<callstack_pos.length || i<callstack_msg.length; ++i)
56 + foreach_reverse(i,_; callstack_pos)
57 57 {
58 - LexPosition p = (i<callstack_pos.length ? callstack_pos[i] : null);
59 - string m = (i<callstack_msg.length ? callstack_msg[i] : null);
58 + LexPosition p = callstack_pos[i];
59 + string m = callstack_msg[i];
60 60 fullmsg ~= p is null ? sprintf!("\n[??] %s")(m)
61 61 : sprintf!("\n[%s] %s")(p, m);
62 62 }
63 63 super(fullmsg, file, line, next);
64 64 this.pos = pos;
65 65 }
66 66 this( string msg, string file=null, size_t line=0, Throwable next=null )