Exceptions
Exceptions 2
Doctrine\ORM\Query\ QueryException
$message = "line 0, col {$tokenPos}: Error: ";
$message .= ($expected !== '') ? "Expected {$expected}, got " : 'Unexpected ';
$message .= ($this->lexer->lookahead === null) ? 'end of string.' : "'{$token['value']}'";
throw QueryException::syntaxError($message, QueryException::dqlError($this->query->getDQL()));
}
/**
* Generates a new semantical error.
*
$this->syntaxError($this->lexer->getLiteral($token));
}
// If parameter is T_IDENTIFIER, then matches T_IDENTIFIER (100) and keywords (200+)
if ($token === Lexer::T_IDENTIFIER && $lookaheadType < Lexer::T_IDENTIFIER) {
$this->syntaxError($this->lexer->getLiteral($token));
}
$this->lexer->moveNext();
}
Parser->StateFieldPathExpression()
in
vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php
(line 2003)
$lookaheadType = $this->lexer->lookahead['type'];
switch (true) {
// ScalarExpression (u.name)
case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_DOT):
$expression = $this->ScalarExpression();
break;
// IdentificationVariable (u)
case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] !== Lexer::T_OPEN_PARENTHESIS):
$expression = $identVariable = $this->IdentificationVariable();
*
* @return \Doctrine\ORM\Query\AST\SelectStatement
*/
public function SelectStatement()
{
$selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause());
$selectStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
$selectStatement->groupByClause = $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
$selectStatement->havingClause = $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
$selectStatement->orderByClause = $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
* \Doctrine\ORM\Query\AST\DeleteStatement
*/
public function getAST()
{
// Parse & build AST
$AST = $this->QueryLanguage();
// Process any deferred validations of some nodes in the AST.
// This also allows post-processing of the AST for modification purposes.
$this->processDeferredIdentificationVariables();
AbstractQuery->executeIgnoreQueryCache()
in
vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php
(line 947)
->join('t.dil', 'd')
->where("t.sayfaId='" .$sayfa['dilgrup']. "' and d.id=" . $suankiDil['id'])
->addOrderBy('t.sira', 'ASC')
->addOrderBy('t.id', 'DESC')
->getQuery()
->getScalarResult();
}
else{
$qb = $em->createQueryBuilder();
$kategoriler = $qb->select('k.dilgrup,k.adi,k.seourl,k.sayfabasligi,k.anahtarkelimeler,k.sayfaaciklamasi,k.ustid,k.resim,k.sayfaId')
->from('PanelBundle:Kategori', 'k')
SiteController->sayfaAction()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php
(line 151)
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
HttpKernel->handleRaw()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php
(line 68)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
HttpKernel->handle()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php
(line 200)
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Doctrine\ORM\Query\ QueryException
$message = "line 0, col {$tokenPos}: Error: ";
$message .= ($expected !== '') ? "Expected {$expected}, got " : 'Unexpected ';
$message .= ($this->lexer->lookahead === null) ? 'end of string.' : "'{$token['value']}'";
throw QueryException::syntaxError($message, QueryException::dqlError($this->query->getDQL()));
}
/**
* Generates a new semantical error.
*
$this->syntaxError($this->lexer->getLiteral($token));
}
// If parameter is T_IDENTIFIER, then matches T_IDENTIFIER (100) and keywords (200+)
if ($token === Lexer::T_IDENTIFIER && $lookaheadType < Lexer::T_IDENTIFIER) {
$this->syntaxError($this->lexer->getLiteral($token));
}
$this->lexer->moveNext();
}
Parser->StateFieldPathExpression()
in
vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php
(line 2003)
$lookaheadType = $this->lexer->lookahead['type'];
switch (true) {
// ScalarExpression (u.name)
case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_DOT):
$expression = $this->ScalarExpression();
break;
// IdentificationVariable (u)
case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] !== Lexer::T_OPEN_PARENTHESIS):
$expression = $identVariable = $this->IdentificationVariable();
*
* @return \Doctrine\ORM\Query\AST\SelectStatement
*/
public function SelectStatement()
{
$selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause());
$selectStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
$selectStatement->groupByClause = $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
$selectStatement->havingClause = $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
$selectStatement->orderByClause = $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
* \Doctrine\ORM\Query\AST\DeleteStatement
*/
public function getAST()
{
// Parse & build AST
$AST = $this->QueryLanguage();
// Process any deferred validations of some nodes in the AST.
// This also allows post-processing of the AST for modification purposes.
$this->processDeferredIdentificationVariables();
AbstractQuery->executeIgnoreQueryCache()
in
vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php
(line 947)
->join('t.dil', 'd')
->where("t.sayfaId='" .$sayfa['dilgrup']. "' and d.id=" . $suankiDil['id'])
->addOrderBy('t.sira', 'ASC')
->addOrderBy('t.id', 'DESC')
->getQuery()
->getScalarResult();
}
else{
$qb = $em->createQueryBuilder();
$kategoriler = $qb->select('k.dilgrup,k.adi,k.seourl,k.sayfabasligi,k.anahtarkelimeler,k.sayfaaciklamasi,k.ustid,k.resim,k.sayfaId')
->from('PanelBundle:Kategori', 'k')
SiteController->sayfaAction()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php
(line 151)
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
HttpKernel->handleRaw()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php
(line 68)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
HttpKernel->handle()
in
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php
(line 200)
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Stack Traces 2
[2/2] QueryException |
---|
Doctrine\ORM\Query\QueryException: [Syntax Error] line 0, col 9: Error: Expected Doctrine\ORM\Query\Lexer::T_IDENTIFIER, got ',' at vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:54 at Doctrine\ORM\Query\QueryException::syntaxError() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:457) at Doctrine\ORM\Query\Parser->syntaxError() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:325) at Doctrine\ORM\Query\Parser->match() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1084) at Doctrine\ORM\Query\Parser->PathExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1141) at Doctrine\ORM\Query\Parser->StateFieldPathExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:2003) at Doctrine\ORM\Query\Parser->ScalarExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:2189) at Doctrine\ORM\Query\Parser->SelectExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1183) at Doctrine\ORM\Query\Parser->SelectClause() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:879) at Doctrine\ORM\Query\Parser->SelectStatement() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:848) at Doctrine\ORM\Query\Parser->QueryLanguage() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:261) at Doctrine\ORM\Query\Parser->getAST() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:360) at Doctrine\ORM\Query\Parser->parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:286) at Doctrine\ORM\Query->_parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:298) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:992) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:947) at Doctrine\ORM\AbstractQuery->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:774) at Doctrine\ORM\AbstractQuery->getScalarResult() (src/SiteBundle/Controller/SiteController.php:156) at SiteBundle\Controller\SiteController->sayfaAction() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle() (web/app.php:19) |
[1/2] QueryException |
---|
Doctrine\ORM\Query\QueryException: SELECT t.,t.dilgrup,t.kategoriId,d.id as did,t.sayfaId FROM PanelBundle: t INNER JOIN t.dil d WHERE t.sayfaId='' and d.id=1 ORDER BY t.sira ASC, t.id DESC at vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:43 at Doctrine\ORM\Query\QueryException::dqlError() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:457) at Doctrine\ORM\Query\Parser->syntaxError() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:325) at Doctrine\ORM\Query\Parser->match() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1084) at Doctrine\ORM\Query\Parser->PathExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1141) at Doctrine\ORM\Query\Parser->StateFieldPathExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:2003) at Doctrine\ORM\Query\Parser->ScalarExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:2189) at Doctrine\ORM\Query\Parser->SelectExpression() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1183) at Doctrine\ORM\Query\Parser->SelectClause() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:879) at Doctrine\ORM\Query\Parser->SelectStatement() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:848) at Doctrine\ORM\Query\Parser->QueryLanguage() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:261) at Doctrine\ORM\Query\Parser->getAST() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:360) at Doctrine\ORM\Query\Parser->parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:286) at Doctrine\ORM\Query->_parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:298) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:992) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:947) at Doctrine\ORM\AbstractQuery->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:774) at Doctrine\ORM\AbstractQuery->getScalarResult() (src/SiteBundle/Controller/SiteController.php:156) at SiteBundle\Controller\SiteController->sayfaAction() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle() (web/app.php:19) |