Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

results: print warning for recoverable errors #148

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion py/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def update_ec(self, ec):
self.ec = ec

def error(self, msg, ec=1, err_prefix=""):
self.print_with_ts("%serror: %s\n" % (err_prefix, msg), prefix="!!! ")
level = "warning" if ec == 0 else "error"
rhyw marked this conversation as resolved.
Show resolved Hide resolved
self.print_with_ts(f"{err_prefix}{level}: {msg}\n", prefix="!!! ")
self.update_ec(ec)
if not self.dying and not self.keep_going and (self.ec != 0):
raise FatalError(ec)
Expand Down