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? Link to comment https://forums.phpfreaks.com/topic/126616-solved-php-pg-error-functions/ 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. Link to comment https://forums.phpfreaks.com/topic/126616-solved-php-pg-error-functions/#findComment-655273 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! Link to comment https://forums.phpfreaks.com/topic/126616-solved-php-pg-error-functions/#findComment-655891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.