class ZtdMysqliException
    extends RuntimeException
Public API: explicitly declared with @visibility public.

ZTD-specific exception for mysqli adapter.

Since mysqli_sql_exception is final, this extends RuntimeException. Users should catch this exception for ZTD-specific errors in the mysqli adapter.

Keep the underlying error available to callersdoctest
$cause = new \RuntimeException('Unknown table');
    $error = new \ZtdQuery\Adapter\Mysqli\ZtdMysqliException('Rewrite failed', 7, $cause);
    $error->getMessage() // => 'Rewrite failed'
    $error->getCode() // => 7
    $error->getPrevious() === $cause // => true

Methods§

public function __construct(string $message, int $code = 0, ?Throwable $previous = null)

Preserve the original failure as the previous exception.

Parameters

$messagestring
$codeint
$previous?Throwable
Calls 1
  • static-call RuntimeException::__construct() line 31

Test cases 15§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5
Other tests reaching this symbol 10

Relations§

Instantiated in 3