public static ErrorMsg getErrorMsg(int errorCode) {
    for (ErrorMsg errorMsg : values()) {
      if (errorMsg.getErrorCode() == errorCode) {
        return errorMsg;
      }
    }
    return null;
  }
Given an error code, returns the ErrorMsg object associated with it.
@param errorCode An error code
@return ErrorMsg
common/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java