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

More specific exception types and no more silent errors #868

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mathbou
Copy link

@mathbou mathbou commented Feb 1, 2023

Hi there,

No new feature here, but a lot of comfort. Working using tk-core and the rest of the toolkit is very frustrating, as a lot of exceptions are catch silently and prints absolutely nothing to the log or the console. So this PR adds log to all silent exceptions.

Also, some except were missing an Exception type, and others were using the bare Exception instead of a more precise one, it's taken care of. Due to the code complexity, a lot of exceptions still need/use the Exception type, but it would be a good thing to get rid of them.

As a "bonus", the QtImporter now raises an ImportError instead of returning a bunch of None.

@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Attention: Patch coverage is 37.98450% with 80 lines in your changes missing coverage. Please review.

Project coverage is 73.43%. Comparing base (43814ac) to head (fe031a9).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
python/tank/platform/engine.py 53.33% 7 Missing ⚠️
python/tank/bootstrap/async_bootstrap.py 0.00% 6 Missing ⚠️
python/tank/util/metrics.py 68.42% 6 Missing ⚠️
.../tank/authentication/interactive_authentication.py 20.00% 4 Missing ⚠️
python/tank/commands/misc.py 0.00% 4 Missing ⚠️
python/tank/descriptor/io_descriptor/git.py 0.00% 4 Missing ⚠️
python/tank/util/qt_importer.py 69.23% 4 Missing ⚠️
python/tank/commands/move_pc.py 0.00% 3 Missing ⚠️
python/tank/commands/push_pc.py 0.00% 3 Missing ⚠️
python/tank/descriptor/io_descriptor/git_branch.py 25.00% 3 Missing ⚠️
... and 22 more

❗ There is a different number of reports uploaded between BASE (43814ac) and HEAD (fe031a9). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (43814ac) HEAD (fe031a9)
10 3
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #868      +/-   ##
==========================================
- Coverage   79.87%   73.43%   -6.44%     
==========================================
  Files         198      198              
  Lines       20719    20756      +37     
==========================================
- Hits        16550    15243    -1307     
- Misses       4169     5513    +1344     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mathbou mathbou force-pushed the fix/more_specific_exceptions branch from a320063 to 5cd3448 Compare August 27, 2023 14:45
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

Successfully merging this pull request may close these issues.

2 participants