Diff
Not logged in

Differences From Artifact [2827b7df74d1df19]:

To Artifact [442c0afd591f3c6a]:


49 template ExceptionWithPosition() 49 template ExceptionWithPosition() 50 { 50 { 51 LexPosition pos; 51 LexPosition pos; 52 this( LexPosition pos, string msg, string file=null, size_t line=0, Thro 52 this( LexPosition pos, string msg, string file=null, size_t line=0, Thro 53 { 53 { 54 string fullmsg = pos is null ? sprintf!("\n[??] %s")(msg) 54 string fullmsg = pos is null ? sprintf!("\n[??] %s")(msg) 55 : sprintf!("\n[%s] %s")(pos, msg); 55 : sprintf!("\n[%s] %s")(pos, msg); 56 for(int i=0; i<callstack_pos.length || i<callstack_msg.length; + | 56 foreach_reverse(i,_; callstack_pos) 57 { 57 { 58 LexPosition p = (i<callstack_pos.length ? callstack_pos[ | 58 LexPosition p = callstack_pos[i]; 59 string m = (i<callstack_msg.length ? callstack_msg[ | 59 string m = callstack_msg[i]; 60 fullmsg ~= p is null ? sprintf!("\n[??] %s")(m) 60 fullmsg ~= p is null ? sprintf!("\n[??] %s")(m) 61 : sprintf!("\n[%s] %s")(p, m); 61 : sprintf!("\n[%s] %s")(p, m); 62 } 62 } 63 super(fullmsg, file, line, next); 63 super(fullmsg, file, line, next); 64 this.pos = pos; 64 this.pos = pos; 65 } 65 } 66 this( string msg, string file=null, size_t line=0, Throwable next=null ) 66 this( string msg, string file=null, size_t line=0, Throwable next=null )