Evaluating __FILE__ and __LINE__ of caller?
bioinfornatics
bioinfornatics at fedoraproject.org
Sat Mar 3 04:21:05 PST 2012
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
More information about the Digitalmars-d-learn
mailing list