errorInfo !== null) { [$sqlState, $code] = $exception->errorInfo; } else { $code = $exception->getCode(); $sqlState = null; } return new self($exception->getMessage(), $sqlState, $code, $exception); } }