Overriding Joomla Error class - Joomla! Forum - community, help and support
ls,
i write own error handling class , extend current error class joomla. meaning extend class ability log errors within log host (configurable) or log errors within local logfile or database. easy error / bug tracking since need in stages of deployment of our applications on j!1.5 framework. can track bugs within joomla framework , bugs within our own extensions.
the whole part configurable, example depending on type of error must able send on email specific address.
for override know can write own plugin (see example below) how can override , extend j!15. error handling object.
thanks responses.
richard
i write own error handling class , extend current error class joomla. meaning extend class ability log errors within log host (configurable) or log errors within local logfile or database. easy error / bug tracking since need in stages of deployment of our applications on j!1.5 framework. can track bugs within joomla framework , bugs within our own extensions.
the whole part configurable, example depending on type of error must able send on email specific address.
for override know can write own plugin (see example below) how can override , extend j!15. error handling object.
code: select all
<?php
// check ensure file within rest of framework
defined('jpath_base') or die();
class plgsystemcustomerrorinitiatior extends jplugin {
function plgsystemcustomerrorinitiatior (& $subject, $config) {
parent::__construct($subject, $config);
}
function onafterinitialise() {
global $mainframe;
if($mainframe->isadmin()) {
return;
}
$newerrorhandler =& $mainframe->get([color=red]how can error object overhere?[/color]);
require_once (jpath_administrator.ds.'components'.ds.'com_customerror'.ds.'.classes' .ds.'error.php' );
$newerrorhandler = new myerrorhanlderr();
}
?>
thanks responses.
richard
the best way of extending jerror using jerror::seterrorhandling , set own callback function.
Comments
Post a Comment