TR

jumphpsql

davidnurdin tarafından · Demolar ve denemeler
henüz puanlanmadı
▶ Aç 💬 Geri bildirim Kaynak 🕘 Sürümler Düzenle GitHub
apps/jumphpsql / src / Db / MysqlError.php · commit 1d1d550
<?phpnamespace App\Db;/** An error of the server (ERR packet: code, SQL state) or of the connection (code 0). */final class MysqlError extends \RuntimeException{    public function __construct(string $message, int $code = 0, public readonly string $sqlState = '')    {        parent::__construct($message, $code);    }    public function describe(): string    {        return $this->getCode() > 0 ? sprintf('%d (%s): %s', $this->getCode(), $this->sqlState, $this->getMessage()) : $this->getMessage();    }}