Further improved text of some error messages

This commit is contained in:
rr- 2015-08-05 17:19:10 +02:00
parent ec5ff5f230
commit 42f37d8fee
2 changed files with 5 additions and 5 deletions

View file

@ -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');
}
}

View file

@ -35,7 +35,7 @@ class TagSearchParser extends AbstractSearchParser
self::ALLOW_COMPOSITE);
}
throw new NotSupportedException();
throw new NotSupportedException('Unknown token: ' . $namedToken->getKey());
}
protected function getOrderColumnMap()