Files
luos/gulliver/system/class.pmException.php

30 lines
618 B
PHP
Raw Normal View History

<?php
use Illuminate\Support\Facades\Log;
/**
* HttpProxyController
*/
class PMException extends Exception
{
public function __construct($message, $code = 0, $previous = null)
{
parent::__construct($message, 1);
}
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
2016-07-27 16:37:21 -04:00
public static function registerErrorLog($error, $token)
{
$message = $error->getMessage();
$context = [
'token' => $token
];
Log::channel(':ExceptionCron')->error($message, Bootstrap::context($context));
2016-07-27 16:37:21 -04:00
}
}