| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/vendor/sentry/sentry/lib/Raven/Breadcrumbs/ |
Upload File : |
<?php
class Raven_Breadcrumbs_ErrorHandler
{
protected $existingHandler;
/**
* @var Raven_Client the client object that sends the message to the server
*/
protected $ravenClient;
/**
* @param Raven_Client $ravenClient
*/
public function __construct(Raven_Client $ravenClient)
{
$this->ravenClient = $ravenClient;
}
public function handleError($code, $message, $file = '', $line = 0, $context = array())
{
$this->ravenClient->breadcrumbs->record(array(
'category' => 'error_reporting',
'message' => $message,
'level' => $this->ravenClient->translateSeverity($code),
'data' => array(
'code' => $code,
'line' => $line,
'file' => $file,
),
));
if ($this->existingHandler !== null) {
return call_user_func($this->existingHandler, $code, $message, $file, $line, $context);
} else {
return false;
}
}
public function install()
{
$this->existingHandler = set_error_handler(array($this, 'handleError'), E_ALL);
return $this;
}
}