| | |
| | | import org.opends.server.admin.client.ManagedObjectDecodingException; |
| | | import org.opends.server.admin.client.MissingMandatoryPropertiesException; |
| | | import org.opends.server.admin.client.OperationRejectedException; |
| | | import org.opends.server.tools.ClientException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.BuildVersion; |
| | | import org.opends.server.util.EmbeddedUtils; |
| | |
| | | import com.forgerock.opendj.cli.SubCommand; |
| | | import com.forgerock.opendj.cli.SubCommandArgumentParser; |
| | | import com.forgerock.opendj.cli.ArgumentGroup; |
| | | import com.forgerock.opendj.cli.CLIException; |
| | | import com.forgerock.opendj.cli.ClientException; |
| | | import org.opends.server.util.cli.CommandBuilder; |
| | | import org.opends.server.util.cli.ConsoleApplication; |
| | | import org.opends.server.util.cli.Menu; |
| | |
| | | */ |
| | | @Override |
| | | public MenuResult<Integer> invoke(ConsoleApplication app) |
| | | throws CLIException { |
| | | throws ClientException { |
| | | try { |
| | | MenuResult<Integer> result = handler.run(app, factory); |
| | | |
| | |
| | | return MenuResult.success(1); |
| | | } catch (ClientException e) { |
| | | app.println(e.getMessageObject()); |
| | | return MenuResult.success(e.getExitCode()); |
| | | return MenuResult.success(e.getReturnCode()); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public final MenuResult<Integer> invoke(ConsoleApplication app) |
| | | throws CLIException { |
| | | throws ClientException { |
| | | try { |
| | | app.println(); |
| | | app.println(); |
| | |
| | | } |
| | | |
| | | return result; |
| | | } catch (CLIException e) { |
| | | } catch (ClientException e) { |
| | | app.println(e.getMessageObject()); |
| | | return MenuResult.success(1); |
| | | } |
| | |
| | | } else { |
| | | return result.getValue(); |
| | | } |
| | | } catch (CLIException e) { |
| | | } catch (ClientException e) { |
| | | app.println(e.getMessageObject()); |
| | | return 1; |
| | | } |
| | |
| | | } catch (ArgumentException e) { |
| | | println(e.getMessageObject()); |
| | | return 1; |
| | | } catch (CLIException e) { |
| | | println(e.getMessageObject()); |
| | | return 1; |
| | | } catch (ClientException e) { |
| | | Throwable cause = e.getCause(); |
| | | if (cause instanceof ManagedObjectDecodingException) { |