Optional.runServer(port);
} catch (Exception e) {
if (e instanceof IOException) {
- System.err
- .println("I/O Exception: Cannot start the server");
- } else {
+ ERR(StringId.CLI_ERR, StringId.CLI_ERR_CANNOT_START,
+ ERR_INTERNAL);
+ return;
+ } else if (e instanceof ClassNotFoundException) {
ERR(StringId.CLI_ERR, StringId.CLI_ERR_NO_REMOTING,
ERR_INTERNAL);
return;
+ } else {
+ e.printStackTrace();
+ ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
+ return;
}
}
break;
try {
transService.updateFile(dir);
} catch (IOException e) {
- System.err.println(trans(StringId.CLI_ERR_CANNOT_CREATE_LANG,
- dir));
- e.printStackTrace();
+ ERR(StringId.CLI_ERR, StringId.CLI_ERR_CANNOT_CREATE_LANG,
+ ERR_INTERNAL);
+ return;
}
break;
}
ERR(StringId.CLI_ERR, StringId.CLI_ERR_CANNOT_START,
ERR_NO_FILE);
return;
- } else {
+ } else if (e instanceof ClassNotFoundException) {
ERR(StringId.CLI_ERR, StringId.CLI_ERR_NO_TUI, ERR_INTERNAL);
return;
+ } else {
+ e.printStackTrace();
+ ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
+ return;
}
}
break;
+ trans(StringId.CLI_HELP_LANG));
System.out.println("\t--tui : " + trans(StringId.CLI_HELP_TUI));
System.out.println("\t--gui : " + trans(StringId.CLI_HELP_GUI));
- System.out.println("\t--noutf : " + trans(StringId.CLI_HELP_NOUTF));
+ System.out.println("\t--noutf : "
+ + trans(StringId.CLI_HELP_NOUTF_OPTION));
System.out.println("\t--config : "
+ trans(StringId.CLI_HELP_CONFIG));
System.out.println();
Data name = contact.getPreferredData("FN");
if (name == null || name.getValue().length() == 0
|| forceComputedFn) {
- name.setValue(contact.toString(defaultFn, ""));
+ name.setValue(contact.toString(defaultFn, "").trim());
}
}
} catch (Exception e) {