| | |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.controls; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | import java.io.IOException; |
| | |
| | | { |
| | | if (value == null) |
| | | { |
| | | Message message = INFO_VLVREQ_CONTROL_NO_VALUE.get(); |
| | | LocalizableMessage message = INFO_VLVREQ_CONTROL_NO_VALUE.get(); |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message); |
| | | } |
| | | |
| | |
| | | break; |
| | | |
| | | default: |
| | | Message message = INFO_VLVREQ_CONTROL_INVALID_TARGET_TYPE.get( |
| | | LocalizableMessage message = INFO_VLVREQ_CONTROL_INVALID_TARGET_TYPE.get( |
| | | byteToHex(targetType)); |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_VLVREQ_CONTROL_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message, e); |
| | | } |