An object for sending captured error info to an HTTP server.
An object for sending captured error info to an HTTP server. In
particular this is made to work with the Trac plugin Autotrac, though
it would be quite simple to make another HTTP server to work with it.
A simple way to use this object is to create an error handler to the
following function report_bug():
function report_bug ($p_number, $p_string, $p_file, $p_line)
{
$reporter = new BugReporter ($p_number, $p_string, $p_file, $p_line);
$reporter->setServer ("http://myserver.com/mydirectory")
$reporter->sendToServer();
}
The errors are always sent to the server URL plus the extension
"/report". So the above example would POST the error variables to
http://myserver.com/mydirectory/newreport . The error variables
POSTed are:
- f_backtrace
- f_id
- f_software
- f_str
- f_num
- f_file
- f_line
- f_backtrace * - f_description
- f_email