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

Changes to not catch exception related to coding errors #2522

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joachimmetz
Copy link
Member

Changes to not catch exception related to coding errors

@joachimmetz joachimmetz requested a review from rgayon May 12, 2019 07:59
@joachimmetz joachimmetz requested review from Onager and removed request for rgayon May 12, 2019 08:00
@joachimmetz joachimmetz assigned Onager and unassigned rgayon May 12, 2019
Copy link
Contributor

@Onager Onager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the rationale for this? Why would we want to crash at runtime if there's a bug?

@joachimmetz joachimmetz requested a review from Onager May 21, 2019 18:18
@joachimmetz
Copy link
Member Author

joachimmetz commented May 21, 2019

Can you explain the rationale for this? Why would we want to crash at runtime if there's a bug?

Pylint and unittests can catch these exceptions when not absorbed by the try except

let's chat about this, I've noticed a couple of time (not specific to plaso) that the broad try except absorbs some exception that could have been caught by the tests. Which then later on lead to other subtle issues.

plaso/engine/single_process.py Outdated Show resolved Hide resolved
@Onager
Copy link
Contributor

Onager commented Jul 5, 2019

I've noticed a couple of time (not specific to plaso) that the broad try except absorbs some exception that could have been caught by the tests. Which then later on lead to other subtle issues.

I can see this happening in tests, but I don't understand could catch any more problems with a specific try-catch block. Can you give an example?

@joachimmetz joachimmetz changed the base branch from master to main February 8, 2021 09:08
@codecov
Copy link

codecov bot commented Feb 14, 2021

Codecov Report

Merging #2522 (2425e32) into main (7b2a4e8) will decrease coverage by 0.07%.
The diff coverage is 21.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2522      +/-   ##
==========================================
- Coverage   85.68%   85.60%   -0.08%     
==========================================
  Files         379      379              
  Lines       32389    32421      +32     
==========================================
+ Hits        27751    27755       +4     
- Misses       4638     4666      +28     
Impacted Files Coverage Δ
plaso/engine/single_process.py 74.05% <0.00%> (-0.95%) ⬇️
plaso/multi_processing/analysis_process.py 33.60% <0.00%> (-0.55%) ⬇️
plaso/parsers/safari_cookies.py 82.90% <0.00%> (-1.45%) ⬇️
plaso/parsers/sqlite_plugins/chrome_cookies.py 95.40% <0.00%> (-2.25%) ⬇️
plaso/parsers/olecf.py 82.14% <20.00%> (-6.10%) ⬇️
plaso/parsers/sqlite.py 72.68% <20.00%> (-1.40%) ⬇️
plaso/multi_processing/worker_process.py 50.57% <25.00%> (-2.37%) ⬇️
plaso/parsers/esedb.py 88.23% <33.33%> (-2.54%) ⬇️
plaso/parsers/esedb_plugins/interface.py 65.83% <33.33%> (-0.62%) ⬇️
plaso/parsers/sqlite_plugins/interface.py 79.06% <33.33%> (-1.66%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b2a4e8...2425e32. Read the comment docs.

@joachimmetz
Copy link
Member Author

@Onager PTAL

@joachimmetz joachimmetz added the blocked Work cannot progress until another issue is resolved label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Work cannot progress until another issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants