protected HiveSQLException toSQLException(String prefix, CommandProcessorException e, String queryId) {
    HiveSQLException ex =
        new HiveSQLException(prefix + ": " + e.getMessage(), e.getSqlState(), e.getResponseCode(), queryId);
    if (e.getCause() != null) {
      ex.initCause(e.getCause());
    }
    return ex;
  }
Verify if the given fetch orientation is part of the supported orientation types.
@param orientation
@param supportedOrientations
@throws HiveSQLException
service/src/java/org/apache/hive/service/cli/operation/Operation.java