ywkaras commented on code in PR #9875:
URL: https://github.com/apache/trafficserver/pull/9875#discussion_r1239134552


##########
src/wccp/WccpConfig.cc:
##########
@@ -96,189 +131,188 @@ CfgString HASH_OPTS[] = {
   {"dst_port", false}
 };
 
-ts::Errata::Code
-code_max(ts::Errata const &err)
+inline Errata
+Unable_To_Create_Service_Group(int line)
 {
-  ts::Errata::Code zret            = 
std::numeric_limits<ts::Errata::Code::raw_type>::min();
-  ts::Errata::const_iterator spot  = err.begin();
-  ts::Errata::const_iterator limit = err.end();
-  for (; spot != limit; ++spot)
-    zret = std::max(zret, spot->getCode());
-  return zret;
+  return Errata(ec_for(EINVAL), ERRATA_FATAL, "Unable to create service group 
at line {} of configuration.", line);
 }
 
-ts::Errata::Message
-Unable_To_Create_Service_Group(int line)
+inline Errata &
+Note_Services_Not_Found(Errata &errata)
 {
-  std::ostringstream out;
-  out << "Unable to create service group at line " << line << " because of 
configuration errors.";
-  return ts::Errata::Message(23, LVL_FATAL, out.str());
+  return errata.note(ERRATA_NOTE, "No services found in configuration.");
 }
 
-ts::Errata::Message
+inline Errata
 Services_Not_Found()
 {
-  return ts::Errata::Message(3, LVL_INFO, "No services found in 
configuration.");
+  Errata errata;
+  errata.note(ERRATA_NOTE, "No services found in configuration.");
+  return errata;

Review Comment:
   How about `return Errata().note(yada);` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to