code: public String getExplanation() {
          if (getCause() instanceof javax.naming.NamingException) {
              return ((javax.naming.NamingException) getCause()).getExplanation();
          }
          return null;
      }
docs: Convenience method to get the explanation associated with this exception,
  if the root cause was an instance of {@link javax.naming.NamingException}.
  
  @return a detail string explaining more about this exception if the root
  cause is an instance of javax.naming.NamingException, or
  <code>null</code> if there is no detail message for this
  exception