LdapQuery: Use Ldap/Exception for errors

refs #5536
This commit is contained in:
Marius Hein 2014-09-02 09:55:57 +02:00
parent 1c24273c9b
commit baf768040f
1 changed files with 2 additions and 4 deletions

View File

@ -4,8 +4,6 @@
namespace Icinga\Protocol\Ldap; namespace Icinga\Protocol\Ldap;
use Icinga\Exception\IcingaException;
/** /**
* Search class * Search class
* *
@ -84,7 +82,7 @@ class Query
public function limit($count = null, $offset = null) public function limit($count = null, $offset = null)
{ {
if (! preg_match('~^\d+~', $count . $offset)) { if (! preg_match('~^\d+~', $count . $offset)) {
throw new IcingaException( throw new Exception(
'Got invalid limit: %s, %s', 'Got invalid limit: %s, %s',
$count, $count,
$offset $offset
@ -316,7 +314,7 @@ class Query
{ {
$parts = array(); $parts = array();
if (! isset($this->filters['objectClass']) || $this->filters['objectClass'] === null) { if (! isset($this->filters['objectClass']) || $this->filters['objectClass'] === null) {
// throw new IcingaException('Object class is mandatory'); throw new Exception('Object class is mandatory');
} }
foreach ($this->filters as $key => $value) { foreach ($this->filters as $key => $value) {
$parts[] = sprintf( $parts[] = sprintf(