添加vendor扩展包
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarExporter\Exception;
|
||||
|
||||
class ClassNotFoundException extends \Exception implements ExceptionInterface
|
||||
{
|
||||
public function __construct(string|\Throwable $class, ?\Throwable $previous = null)
|
||||
{
|
||||
if ($class instanceof \Throwable) {
|
||||
parent::__construct($class->getMessage(), 0, $class);
|
||||
} else {
|
||||
parent::__construct(\sprintf('Class "%s" not found.', $class), 0, $previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarExporter\Exception;
|
||||
|
||||
interface ExceptionInterface extends \Throwable
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarExporter\Exception;
|
||||
|
||||
class LogicException extends \LogicException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarExporter\Exception;
|
||||
|
||||
class NotInstantiableTypeException extends \Exception implements ExceptionInterface
|
||||
{
|
||||
public function __construct(string|\Throwable $type, ?\Throwable $previous = null)
|
||||
{
|
||||
if ($type instanceof \Throwable) {
|
||||
parent::__construct($type->getMessage(), 0, $type);
|
||||
} else {
|
||||
parent::__construct(\sprintf('Type "%s" is not instantiable.', $type), 0, $previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user