Added error logging for fatal errors
This commit is contained in:
parent
39b2688675
commit
a9b0a99119
@ -20,7 +20,27 @@
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
error_reporting(-1 & ~(E_STRICT));
|
||||
error_reporting(-1 & ~(E_STRICT | E_DEPRECATED));
|
||||
|
||||
/**
|
||||
* Log fatal errors
|
||||
*/
|
||||
function log_fatal()
|
||||
{
|
||||
// Catch the last error
|
||||
$error = error_get_last();
|
||||
|
||||
// types of errors that are fatal
|
||||
$fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR);
|
||||
|
||||
// Display pretty error page
|
||||
if(in_array($error['type'], $fatal))
|
||||
{
|
||||
file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
register_shutdown_function('log_fatal');
|
||||
|
||||
if ( ! class_exists('gtk'))
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ class Main extends GtkWindow {
|
||||
$dlg = new GtkAboutDialog();
|
||||
$dlg->set_transient_for($this);
|
||||
|
||||
$dlg->set_program_name($this->get_title());
|
||||
$dlg->set_name($this->get_title());
|
||||
$dlg->set_version('0.1.0pre');
|
||||
|
||||
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
|
||||
|
Reference in New Issue
Block a user