private Throwable cleanup(final Throwable t, final String msg) {
    // Don't log as error if NSRE; NSRE is 'normal' operation.
    if (t instanceof NotServingRegionException) {
      LOG.debug("NotServingRegionException; " + t.getMessage());
      return t;
    }
    Throwable e = t instanceof RemoteException ? ((RemoteException) t).unwrapRemoteException() : t;
    if (msg == null) {
      LOG.error("", e);
    } else {
      LOG.error(msg, e);
    }
    if (!rpcServices.checkOOME(t)) {
      checkFileSystem();
    }
    return t;
  }
Cleanup after Throwable caught invoking method. Converts <code>t</code> to IOE if it isn't
already.
@param t   Throwable
@param msg Message to log in error. Can be null.
@return Throwable converted to an IOE; methods can only let out IOEs.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java