Evaluating __FILE__ and __LINE__ of caller?
Jonathan M Davis
jmdavisProg at gmx.com
Sat Mar 3 11:43:52 PST 2012
On Saturday, March 03, 2012 13:21:05 bioinfornatics wrote:
> Le samedi 03 mars 2012 à 02:39 +0100, Adam D. Ruppe a écrit :
> > On Saturday, 3 March 2012 at 01:36:51 UTC, H. S. Teoh wrote:
> > > int opIndex(int x) {
> >
> > Make that
> >
> > (int x, string file = __FILE__, int line = __LINE__)
> >
> > and use file/line in there. The exception consturctors
> > do this, so you can
> >
> > throw new Exception("msg", file, line);
> >
> > and get it passed on.
>
> I think __LINE__ is size_t not int
Yes, it's size_t.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list