Michdd Posted August 24, 2009 Share Posted August 24, 2009 For a class that I'm writing is it possible to get the line/file of a functions call without having to actually pass __FILE__ and __LINE__ in the parameters? Because if I just use __FILE__ and __LINE__ when I'm writing the error message it'll just display the line of where in the class it has the error, not where the function was called. Quote Link to comment https://forums.phpfreaks.com/topic/171663-solved-error-handling/ Share on other sites More sharing options...
Michdd Posted August 24, 2009 Author Share Posted August 24, 2009 I guess a better way to say this would be: Is it possible to get the line/file that a function was called from inside that function? Quote Link to comment https://forums.phpfreaks.com/topic/171663-solved-error-handling/#findComment-905198 Share on other sites More sharing options...
PFMaBiSmAd Posted August 24, 2009 Share Posted August 24, 2009 See this link - debug_backtrace Quote Link to comment https://forums.phpfreaks.com/topic/171663-solved-error-handling/#findComment-905204 Share on other sites More sharing options...
Michdd Posted August 24, 2009 Author Share Posted August 24, 2009 Ah, thanks. I skimmed over that, but I thought it wasn't what I was looking for. Quote Link to comment https://forums.phpfreaks.com/topic/171663-solved-error-handling/#findComment-905207 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.