code: public static ClusterException create(Type type, String message) {
          switch (type) {
              case METASTORE:
                  return new MetaStoreException(message);
              default:
                  throw new IllegalArgumentException("Invalid exception type");
          }
      }
docs: Factory method to construct Store exceptions.
  
  @param type Type of Exception.
  @param message Exception message
  @return Instance of ClusterException.