code: public RuntimeException handleException(final Exception e) {
          log.error(e.getMessage(), e);
          if (e instanceof RuntimeException && EnvUtil.isPortableType(e.getClass()) ) {
              return (RuntimeException) e;
          }
          return new GenericPortableException( e.getMessage(), e );
      }
docs: <p>Return a <code>@Portable RuntimeException</code> that can be captured by client side widgets.</p>
  
  @param e The exception that caused the error.
  @return The portable exception to send to the client side.