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

Why are exceptions in summary method ignored? #12

Open
mback2k opened this issue Jul 7, 2020 · 2 comments
Open

Why are exceptions in summary method ignored? #12

mback2k opened this issue Jul 7, 2020 · 2 comments

Comments

@mback2k
Copy link

mback2k commented Jul 7, 2020

I see that exceptions thrown during summary creation are currently ignored:

try:
summary = self.summary(full_report)
except Exception:
pass

Why is that the case? This is quite annoying during analyzer development and I cannot think of a valid reason for this.
Is this maybe for some backwards compatibility to analyzers without a summary function? If so, can't this be made more specific?

@nadouani
Copy link
Contributor

nadouani commented Oct 7, 2020

Hello @mback2k the initial reason was to not break the analysis because of a unhandled issue in the summary.

With that being said, we are open for any better idea.

How would you handle this?

@mback2k
Copy link
Author

mback2k commented Oct 8, 2020

Hello @mback2k the initial reason was to not break the analysis because of a unhandled issue in the summary.

I understand that, but why is it assumed that there are unhandled issues in the summary generation?

With that being said, we are open for any better idea.

How would you handle this?

I would make it possible for Cortex Analyzers to return a result and an error message in order to enable the result still being processed, but also show the error (maybe as a warning about the result potentially being incomplete).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants