CodeIgniter Forums

Full Version: extending core class not function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi I would error log messages send by email. T extend core class in application/core i have MY_Exceptions.php with this code
class MY_Exceptions extends CI_Exceptions {

    function __construct(){

    function log_exception($severity, $message, $filepath, $line)


        $ci =& get_instance();
        $severity = ( ! isset($ci->levels[$severity])) ? $severity : $ci->levels[$severity];

        log_message('error', 'Severity: '.$severity.'  --> '.$message. ' '.$filepath.' '.$line, TRUE);

        $ci->email->from('[email protected]', 'Server Name');
        $ci->email->to('[email protected]');

        $ci->email->message('Severity: '.$severity.'  --> '.$message. ' '.$filepath.' '.$line);



where i have mistake, this code isnt function