// In the exception we throw over to the server, strip the InvalidPluginConfigurationException out of the
// stack trace, but append the message from that exception to the message of the exception we throw. This
// will make for a nicer error message for the server to display in the UI.
errorMessage += ((t.getLocalizedMessage() != null) ? (" " + t.getLocalizedMessage()) : "");
throw new InvalidPluginConfigurationClientException(errorMessage,
(t.getCause() != null) ? new WrappedRemotingException(t.getCause()) : null);
} else {
log.error("Manual add failed for resource of type [" + resourceType.getName()
+ "] and parent resource id [" + parentResourceId + "]", t);
throw new PluginContainerException("Failed to add resource with type [" + resourceType.getName()