extending core class not function

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.