public static ErrorMsg getErrorMsg(Exception e) {
    if (e instanceof AccessControlException) {
      return ACCESS_DENIED;
    }
    if (e instanceof NSQuotaExceededException) {
      return QUOTA_EXCEEDED;
    }
    if (e instanceof DSQuotaExceededException) {
      return QUOTA_EXCEEDED;
    }
    if (e instanceof UnresolvedPathException) {
      return UNRESOLVED_PATH;
    }
    if (e instanceof FileNotFoundException) {
      return FILE_NOT_FOUND;
    }
    return UNRESOLVED_RT_EXCEPTION;
  }
Given a remote runtime exception, returns the ErrorMsg object associated with it.
@param e An exception
@return ErrorMsg
common/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java