Page 1 of 1
Get Error Information
Posted: Thu Apr 24, 2008 5:52 pm
by aliasxneo
Is it possible to get information such as line, file, etc. like you would get from an Exception without actually throwing an exception? For instance if I called a function could I find out what line/file that function was called from?
Any input would be helpful, thanks.
Re: Get Error Information
Posted: Thu Apr 24, 2008 5:54 pm
by Oren
Re: Get Error Information
Posted: Thu Apr 24, 2008 6:02 pm
by aliasxneo
Key word being
current. I'm looking more for a reference. For instance:
Code: Select all
function test()
{
// I want to know what line this function was called from //
}
test();
In the above case it would have been line 7 that the function was called from. Same goes for the file, the function will be stored in a class that's in a separate file so the file constant wouldn't work either.