diff --git a/src/Search/Parsers/SnapshotSearchParser.php b/src/Search/Parsers/SnapshotSearchParser.php index 9d63a0fb..18a78374 100644 --- a/src/Search/Parsers/SnapshotSearchParser.php +++ b/src/Search/Parsers/SnapshotSearchParser.php @@ -18,10 +18,10 @@ class SnapshotSearchParser extends AbstractSearchParser protected function decorateFilterFromToken(IFilter $filter, SearchToken $token) { if (substr_count($token->getValue(), ',') !== 1) - throw new NotSupportedException(); + throw new NotSupportedException('Expected token in form of "type,id"'); if ($token->isNegated()) - throw new NotSupportedException(); + throw new NotSupportedException('Negative searches are not supported in this context'); list ($type, $primaryKey) = explode(',', $token->getValue()); @@ -38,11 +38,11 @@ class SnapshotSearchParser extends AbstractSearchParser protected function decorateFilterFromNamedToken(IFilter $filter, NamedSearchToken $namedToken) { - throw new NotSupportedException(); + throw new NotSupportedException('Named tokens are not supported in this context'); } protected function getOrderColumnMap() { - throw new NotSupportedException(); + throw new NotSupportedException('Search order is not supported in this context'); } } diff --git a/src/Search/Parsers/TagSearchParser.php b/src/Search/Parsers/TagSearchParser.php index f33300f3..d10f1a9c 100644 --- a/src/Search/Parsers/TagSearchParser.php +++ b/src/Search/Parsers/TagSearchParser.php @@ -35,7 +35,7 @@ class TagSearchParser extends AbstractSearchParser self::ALLOW_COMPOSITE); } - throw new NotSupportedException(); + throw new NotSupportedException('Unknown token: ' . $namedToken->getKey()); } protected function getOrderColumnMap()