View Single Post
Old 05-17-2009, 09:50 AM   #2 (permalink)
Hightower
The Acquainted
 
Hightower's Avatar
 
Join Date: May 2009
Location: Durham, UK
Posts: 134
Thanks: 9
Hightower is on a distinguished road
Default

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.
__________________
Hightower's Softpolio
Send a message via MSN to Hightower
Hightower is offline  
Reply With Quote