jones53084 Posted October 1, 2008 Share Posted October 1, 2008 Hi! I'm looking for a way to trap postgres errors. I am using the pg_result_error function. It returns the sql error, however it does not return the script and the line number of the error. Neither does the pg_result_error_field function. Is there any way to return a message similar to the pg_execute function? Quote Link to comment Share on other sites More sharing options...
btherl Posted October 2, 2008 Share Posted October 2, 2008 You can use these to generate your own error messages including script and line. Often a backtrace is more useful. Quote Link to comment Share on other sites More sharing options...
jones53084 Posted October 2, 2008 Author Share Posted October 2, 2008 debug_backtrace() is exactly what I needed. Thank! Quote Link to comment 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.