Re: Getting line number where error occured?

2009-01-16 Thread Jarrett Billingsley
On Fri, Jan 16, 2009 at 2:40 AM, Hoenir wrote: > Jarrett Billingsley schrieb: >> >> Team0xf has made a few traceback modules which work only with Tango on >> Windows to fill in this info, but there's no reason it couldn't be >> done on other platforms or with Phobos. > > only with Tango? I've also

Re: Getting line number where error occured?

2009-01-15 Thread Hoenir
Jarrett Billingsley schrieb: Team0xf has made a few traceback modules which work only with Tango on Windows to fill in this info, but there's no reason it couldn't be done on other platforms or with Phobos. only with Tango? I've also seen some Phobos hacks on their site.

Re: Getting line number where error occured?

2009-01-15 Thread Jarrett Billingsley
On Thu, Jan 15, 2009 at 8:50 PM, Sergey Gromov wrote: > > You're correct, I missed that. Exception is derived from Throwable in > druntime, and Throwable has a field 'info' of type TraceInfo with > opApply in its interface. > > But it doesn't work, at least with DMD 2.023 on Windows. Attempts to

Re: Getting line number where error occured?

2009-01-15 Thread Bill Baxter
On Fri, Jan 16, 2009 at 10:50 AM, Sergey Gromov wrote: > Thu, 15 Jan 2009 13:08:35 -0500, Kagamin wrote: > >> Bill Baxter Wrote: >> >>> Nothing built-in for this, >>> but there are the backtrace hacks: >>> http://team0xf.com/index.php?n=Site.Download >>> Never tried those myself though. >>> >>> I

Re: Getting line number where error occured?

2009-01-15 Thread Sergey Gromov
Thu, 15 Jan 2009 13:08:35 -0500, Kagamin wrote: > Bill Baxter Wrote: > >> Nothing built-in for this, >> but there are the backtrace hacks: >> http://team0xf.com/index.php?n=Site.Download >> Never tried those myself though. >> >> I use a debugger when I need a stack trace. >> http://ddbg.mainia.

Re: Getting line number where error occured?

2009-01-15 Thread Kagamin
Bill Baxter Wrote: > Nothing built-in for this, > but there are the backtrace hacks: > http://team0xf.com/index.php?n=Site.Download > Never tried those myself though. > > I use a debugger when I need a stack trace. > http://ddbg.mainia.de/releases.html (Windows - on Linux I think you > can use G

Re: Getting line number where error occured?

2009-01-14 Thread Bill Baxter
On Thu, Jan 15, 2009 at 12:02 PM, Sergey Gromov wrote: > Thu, 15 Jan 2009 02:47:07 +0100, Hoenir wrote: > >> Might be a dumb question, but is it possible in any way to get the line >> number where an error occured? >> Don't think so, but maybe I'm missing something. > > assert gives a line number.

Re: Getting line number where error occured?

2009-01-14 Thread Sergey Gromov
Thu, 15 Jan 2009 02:47:07 +0100, Hoenir wrote: > Might be a dumb question, but is it possible in any way to get the line > number where an error occured? > Don't think so, but maybe I'm missing something. assert gives a line number. There's also a keyword, __LINE__, which is an expression evalu

Getting line number where error occured?

2009-01-14 Thread Hoenir
Might be a dumb question, but is it possible in any way to get the line number where an error occured? Don't think so, but maybe I'm missing something.