Is there any way to redirect a user to a different page when they get a fatal error due to a bad URL?
Currently in my db class I have the line:
$result = mysql_query($query, $dbconnect) or trigger_error('SQL ' . $query . "\nREQUEST_URI = " . $_SERVER['REQUEST_URI'] . " and HTTP_REFERER = " . $_SERVER['HTTP_REFERER'], E_USER_ERROR);
Which (on the live site, with error display suppressed) just returns a white page (though it does write the error to a log file, which is important).
I'd like to trigger the error, so I get the log info, but not show the user a white page.
Is this possible?