vendor/ramsey/uuid/src/Console/Util/ErrorHandler.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* This file is part of the Rhumsaa\Uuid library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) 2013-2014 Ben Ramsey <http://benramsey.com>
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Rhumsaa\Uuid\Console\Util;
/**
* Convert PHP errors into exceptions
*/
class ErrorHandler
{
/**
* Error handler
*
* @param int $level Level of the error raised
* @param string $message Error message
* @param string $file Filename that the error was raised in
* @param int $line Line number the error was raised at
*
* @static
*
* @throws \ErrorException
*/
public static function handle($level, $message, $file, $line)
{
// respect error_reporting being disabled
if (!error_reporting()) {
return;
}
throw new \ErrorException($message, 0, $level, $file, $line);
}
/**
* Register error handler
*
* @static
*/
public static function register()
{
set_error_handler(array(__CLASS__, 'handle'));
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。