Is it possible to get at the file and line number of where a function is
being called from? For example:

        class A {
                int opIndex(int x) {
                        /* do a bunch of checks */
                        if (checkFailed)
                                throw new RangeError(...);

                        /* compute value */
                        return value;
                }
        }

I'd like to be able to throw the exception referencing the file/line of
the caller, rather than opIndex() itself. Is this possible?


T

-- 
Two wrongs don't make a right; but three rights do make a left...

Reply via email to