Services_Hoptoad::notify PHP Method

notify() public method

Pass the error and environment data on to Hoptoad
Author: Rich Cavanaugh
public notify ( mixed $error_class, string $message, string $file, string $line, array $trace, $component = NULL )
$error_class mixed
$message string
$file string
$line string
$trace array
    function notify($error_class, $message, $file, $line, $trace, $component = NULL)
    {
        $this->setParamsForNotify($error_class, $message, $file, $line, $trace, $component);
        $url = "http://hoptoadapp.com/notifier_api/v2/notices";
        $headers = array('Accept' => 'text/xml, application/xml', 'Content-Type' => 'text/xml');
        $body = $this->buildXmlNotice();
        try {
            $status = call_user_func_array(array($this, $this->client . 'Request'), array($url, $headers, $body));
            if ($status != 200) {
                $this->handleErrorResponse($status);
            }
        } catch (RuntimeException $e) {
            // TODO do something reasonable with the runtime exception.
            // we can't really throw our runtime exception since we're likely in
            // an exception handler. Punt on this for now and come back to it.
        }
    }