private static String parseMessage(String originalMessage) {
    // Serialization of the exception places a duplicate class name. Try to strip that off if it
    // exists. Best effort... Looks something like:
    // "org.apache.hadoop.hbase.quotas.SpaceLimitingException: NO_INSERTS A Put is disallowed due
    // to a space quota."
    if (originalMessage != null && originalMessage.startsWith(MESSAGE_PREFIX)) {
      // If it starts with the class name, rip off the policy too.
      try {
        int index = originalMessage.indexOf(' ', MESSAGE_PREFIX.length());
        return originalMessage.substring(index + 1);
      } catch (Exception e) {
        if (LOG.isTraceEnabled()) {
          LOG.trace("Failed to trim exception message", e);
        }
      }
    }
    return originalMessage;
  }
Returns the violation policy in effect.
@return The violation policy in effect.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitingException.java