public void exception(Throwable rawThrowable) {
    source.exception();

    Throwable throwable = unwrap(rawThrowable);
    /**
     * Keep some metrics for commonly seen exceptions Try and put the most common types first. Place
     * child types before the parent type that they extend. If this gets much larger we might have
     * to go to a hashmap
     */
    if (throwable != null) {
      if (throwable instanceof OutOfOrderScannerNextException) {
        source.outOfOrderException();
      } else if (throwable instanceof RegionTooBusyException) {
        source.tooBusyException();
      } else if (throwable instanceof UnknownScannerException) {
        source.unknownScannerException();
      } else if (throwable instanceof ScannerResetException) {
        source.scannerResetException();
      } else if (throwable instanceof RegionMovedException) {
        source.movedRegionException();
      } else if (throwable instanceof NotServingRegionException) {
        source.notServingRegionException();
      } else if (throwable instanceof FailedSanityCheckException) {
        source.failedSanityException();
      } else if (throwable instanceof MultiActionResultTooLarge) {
        source.multiActionTooLargeException();
      } else if (throwable instanceof CallQueueTooBigException) {
        source.callQueueTooBigException();
      } else if (throwable instanceof QuotaExceededException) {
        source.quotaExceededException();
      } else if (throwable instanceof RpcThrottlingException) {
        source.rpcThrottlingException();
      } else if (throwable instanceof CallDroppedException) {
        source.callDroppedException();
      } else if (throwable instanceof RequestTooBigException) {
        source.requestTooBigException();
      } else {
        source.otherExceptions();
        if (LOG.isDebugEnabled()) {
          LOG.debug("Unknown exception type", throwable);
        }
      }
    }
  }
Increment the count for a specific exception type. This is called for each exception type that
is returned to the thrift handler.
@param rawThrowable type of exception
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java