Browse files

throwing a better exception in the QueryManager if you try to build a…

… QOM query from a string
  • Loading branch information...
1 parent 2b7765d commit 097022626bcf4da687136ff053a630620f20cb73 @dbu dbu committed Nov 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Jackalope/Query/QueryManager.php
@@ -43,7 +43,7 @@ public function createQuery($statement, $language)
case \PHPCR\Query\QueryInterface::JCR_SQL2:
return $this->factory->get('Query\SqlQuery', array($statement, $this->objectManager));
case \PHPCR\Query\QueryInterface::JCR_JQOM:
- throw new NotImplementedException();
+ throw new \PHPCR\Query\InvalidQueryException('Please use getQOMFactory to get the query object model factory. You can not build a QOM query from a string.');
throw new \PHPCR\Query\InvalidQueryException("No such query language: $language");

0 comments on commit 0970226

Please sign in to comment.