*
* @return Generated {@link NamingException} exception.
*/
@SuppressWarnings("deprecation")
protected NamingException newNamingException(Throwable e) {
NamingException ret = (e instanceof AccessException) ? new NoPermissionException()
: (e instanceof ConnectException) ? new ServiceUnavailableException()
: (e instanceof ConnectIOException)
|| (e instanceof ExportException)
|| (e instanceof MarshalException)
|| (e instanceof UnmarshalException) ? new CommunicationException()