Enable servers to send sampling messages to clients (#101)

This commit is contained in:
Christopher Hertel 2025-11-01 09:02:24 +01:00 • committed by GitHub
commit fb3c1e65a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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;
}
}