• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Run something in XenForo_Error::logException


Well-known member
How could i run own code after the error has been logged into the db without editing/replacing the XenForo_Error file?

$db->insert('xf_error_log', array(
                    'exception_date' => XenForo_Application::$time,
                    'user_id' => XenForo_Visitor::hasInstance() ? XenForo_Visitor::getUserId() : null,
                    'ip_address' => XenForo_Model::create('XenForo_Model_Login')->convertIpToLong(),
                    'exception_type' => get_class($e),
                    'message' => $e->getMessage(),
                    'filename' => $file,
                    'line' => $e->getLine(),
                    'trace_string' => $e->getTraceAsString(),
                    'request_state' => serialize($request)