diff --git a/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapConfigException.java b/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapConfigException.java deleted file mode 100644 index 9f705cc..0000000 --- a/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapConfigException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2014 Red Hat, Inc. and/or its affiliates. - - This file is part of lightblue. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ -package com.redhat.lightblue.config.ldap; - -/** - * LDAP Configuration Exception - * - * @author dcrissman - */ -public class LdapConfigException extends RuntimeException { - - private static final long serialVersionUID = -1592146043661826825L; - - public LdapConfigException(String message) { - super(message); - } - - public LdapConfigException(Throwable cause) { - super(cause); - } - - public LdapConfigException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapDataSourceConfiguration.java b/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapDataSourceConfiguration.java index cacfc29..6b2373f 100644 --- a/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapDataSourceConfiguration.java +++ b/lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapDataSourceConfiguration.java @@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.redhat.lightblue.config.DataSourceConfiguration; import com.redhat.lightblue.metadata.ldap.parser.LdapDataStoreParser; +import com.redhat.lightblue.util.Error; import com.unboundid.ldap.sdk.BindRequest; import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPConnectionPool; @@ -136,7 +137,7 @@ public void initializeFromJson(JsonNode node) { connectionPool = new LDAPConnectionPool(serverSet, bindRequest, initialConnections, maxConnections); } catch(LDAPException e) { - throw new LdapConfigException("Unable to connect to ldap server(s).", e); + throw Error.get(e); } }