🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Limit error message overriding when
  • Loading branch information
ksunden committed Jul 5, 2023
commit e0826a2ec69bc3cf71ba7ca7945774d9213d7d5e
3 changes: 2 additions & 1 deletion pyparsing/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,8 @@ def parseImpl(self, instring, loc, doActions=True):
try:
return self.expr._parse(instring, loc, doActions, callPreParse=False)
except ParseBaseException as pbe:
pbe.msg = self.errmsg
if not isinstance(self, Forward) or self.customName is not None:
pbe.msg = self.errmsg
raise
else:
raise ParseException(instring, loc, "No expression defined", self)
Expand Down