From 5626a02d69e26bda25bc14f9e5405dce7f928d17 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 1 Apr 2015 17:12:28 +0200 Subject: throw exception if setup is incomplete --- apps/user_ldap/lib/connection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 3869f5da9c9..1e18a8d4aa7 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -31,6 +31,8 @@ namespace OCA\user_ldap\lib; //magic properties (incomplete) +use OC\ServerNotAvailableException; + /** * responsible for LDAP connections in context with the provided configuration * @@ -168,7 +170,7 @@ class Connection extends LDAPUtility { } if(is_null($this->ldapConnectionRes)) { \OCP\Util::writeLog('user_ldap', 'No LDAP Connection to server ' . $this->connection->ldapHost, \OCP\Util::ERROR); - throw new \Exception('Connection to LDAP server could not be established'); + throw new ServerNotAvailableException('Connection to LDAP server could not be established'); } return $this->ldapConnectionRes; } -- cgit v1.2.3