public Exception unwrapRemoteException() {
    final Throwable cause = getCause();
    if (cause instanceof RemoteException) {
      return ((RemoteException) cause).unwrapRemoteException();
    }
    if (cause instanceof Exception) {
      return (Exception) cause;
    }
    return new Exception(cause);
  }
Create a new RemoteProcedureException that can be serialized. It is assumed that this came form
a local source.
@param source the host or thread name of the source
@param cause  the actual cause of the exception
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/RemoteProcedureException.java