Enable servers to send sampling messages to clients (#101)
This commit is contained in:
parent
67cc641247
commit
fb3c1e65a6
1 changed files with 460 additions and 137 deletions
33
src/Exception/ClientException.php
Normal file
33
src/Exception/ClientException.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the official PHP MCP SDK.
|
||||
*
|
||||
* A collaboration between Symfony and the PHP Foundation.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Mcp\Exception;
|
||||
|
||||
use Mcp\Schema\JsonRpc\Error;
|
||||
|
||||
/**
|
||||
* @author Christopher Hertel <mail@christopher-hertel.de>
|
||||
*/
|
||||
class ClientException extends Exception
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Error $error,
|
||||
) {
|
||||
parent::__construct($error->message);
|
||||
}
|
||||
|
||||
public function getError(): Error
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue