public static JobID StringToJobID(String id)
    throws BadParam {
    try {
      return JobID.forName(id);
    } catch (IllegalArgumentException e) {
      throw new BadParam(e.getMessage());
    }
  }
A version of JobID.forName with our app specific error handling.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/StatusDelegator.java