05-17-2009, 09:50 AM
|
#2 (permalink)
|
|
The Acquainted
Join Date: May 2009
Location: Durham, UK
Posts: 134
Thanks: 9
|
If I'm thinking of the same thing, I believe the way to do this would be to use an error handler:
PHP Code:
function custom_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) { }
set_error_handler('customer_error_handler');
You can then set your error message to whatever you want within that function:
PHP Code:
$m = "A major mishap took place in '$e_file' on line '$e_line' with the message '$e_message'.";
You can then trigger this custom error in other scripts (so long as you have included this file):
PHP Code:
trigger_error('Could not connect with error: ' . mysqli_connect_error());
This is the kind of thing that I'm looking into at the minute, and if I've understood your query properly I think this should help you.
|
|
|