| | |
| | | import org.forgerock.opendj.config.conditions.Condition; |
| | | import org.forgerock.opendj.config.conditions.ContainsCondition; |
| | | import org.forgerock.opendj.ldap.AuthorizationException; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.LdapException; |
| | | |
| | | import com.forgerock.opendj.cli.Argument; |
| | | import com.forgerock.opendj.cli.ArgumentException; |
| | |
| | | } catch (AuthorizationException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_AUTHZ.get(ufn); |
| | | throw new ClientException(ReturnCode.INSUFFICIENT_ACCESS_RIGHTS, msg); |
| | | } catch (ErrorResultException e) { |
| | | } catch (LdapException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CE.get(ufn, e.getMessage()); |
| | | throw new ClientException(ReturnCode.OTHER, msg); |
| | | } |
| | |
| | | } else { |
| | | throw new ClientException(ReturnCode.CONSTRAINT_VIOLATION, e.getMessageObject(), e); |
| | | } |
| | | } catch (ErrorResultException e) { |
| | | } catch (LdapException e) { |
| | | final LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CE.get(ufn, e.getMessage()); |
| | | if (app.isInteractive()) { |
| | | app.println(); |
| | |
| | | } catch (ConcurrentModificationException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CME.get(irelation.getUserFriendlyName()); |
| | | throw new ClientException(ReturnCode.CONSTRAINT_VIOLATION, msg); |
| | | } catch (ErrorResultException e) { |
| | | } catch (LdapException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CE.get(irelation.getUserFriendlyName(), |
| | | e.getMessage()); |
| | | throw new ClientException(ReturnCode.APPLICATION_ERROR, msg); |
| | |
| | | } else { |
| | | throw new ClientException(ReturnCode.NO_SUCH_OBJECT, msg); |
| | | } |
| | | } catch (ErrorResultException e) { |
| | | } catch (LdapException e) { |
| | | throw new ClientException(ReturnCode.OTHER, LocalizableMessage.raw(e.getLocalizedMessage())); |
| | | } |
| | | |
| | |
| | | } catch (ConcurrentModificationException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CME.get(ufn); |
| | | throw new ClientException(ReturnCode.CONSTRAINT_VIOLATION, msg); |
| | | } catch (ErrorResultException e) { |
| | | } catch (LdapException e) { |
| | | LocalizableMessage msg = ERR_DSCFG_ERROR_CREATE_CE.get(ufn, e.getMessage()); |
| | | throw new ClientException(ReturnCode.CLIENT_SIDE_SERVER_DOWN, msg); |
| | | } |