Clendenin commented on code in PR #13206:
URL: https://github.com/apache/trafficserver/pull/13206#discussion_r4414547014
##########
tools/hrw4u/src/hrw_visitor.py:
##########
@@ -66,13 +66,10 @@ def _cached_percent_parsing(self, pct_text: str) ->
tuple[str, str | None]:
return self.symbol_resolver.parse_percent_block(pct_text)
@lru_cache(maxsize=256)
- def _cached_symbol_to_ident(self, pct_text: str, section_name: str) ->
tuple[str, str]:
+ def _cached_symbol_to_ident(self, pct_text: str, section_name: str) ->
tuple[str, bool]:
"""Cache expensive symbol resolution operations."""
- try:
- section = SectionType(section_name)
- return self.symbol_resolver.percent_to_ident_or_func(pct_text,
section)
- except (ValueError, SymbolResolutionError):
- return pct_text, ""
+ section = SectionType(section_name)
+ return self.symbol_resolver.percent_to_ident_or_func(pct_text, section)
Review Comment:
Addressed in 09b7a21. The inline-percent path through
`_rewrite_inline_percents` and `_make_percent_replacer` in `hrw_symbols.py`
also had its `try/except SymbolResolutionError` fallback removed, so
operator-arg paths now propagate the error through the existing `trap()` on
`visitOpLine`. Added `test_u4wrh_unmapped_percent_in_operator_arg_errors` to
pin that behavior.
--
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]