Skip to content

Log exception in scan and command methods#162

Merged
GDYendell merged 8 commits intomainfrom
146_raise_exception_scan_command
Aug 18, 2025
Merged

Log exception in scan and command methods#162
GDYendell merged 8 commits intomainfrom
146_raise_exception_scan_command

Conversation

@shihab-dls
Copy link
Contributor

Fixes #146

This PR adds a callback to scan coroutines that raises their exception if they fail. SoftIOC command exceptions were already being displayed on terminal, whereas p4p command exceptions were not; these tracebacks are now printed to terminal.

@shihab-dls shihab-dls changed the title 146 raise exception scan command Log exception in scan and command methods Jun 6, 2025
@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (c3f8d50) to head (6f61ae2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #162      +/-   ##
==========================================
+ Coverage   92.22%   92.24%   +0.02%     
==========================================
  Files          40       40              
  Lines        2070     2077       +7     
==========================================
+ Hits         1909     1916       +7     
  Misses        161      161              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shihab-dls shihab-dls requested a review from GDYendell June 6, 2025 12:54
@shihab-dls
Copy link
Contributor Author

Returning to this PR, it seems that the current state is that command's that raise exceptions are printed to the terminal. So, we can remove the specific print statement I added in pva. Scan routines that raise exceptions are not printed without the changes introduced in this PR, so that should stay.

@shihab-dls
Copy link
Contributor Author

I've brought the branch back up to date, so I'm re-requesting a review. I could not reproduce having a command raise an exception and not seeing it on the terminal, so I've focused this PR on scan

@shihab-dls shihab-dls requested a review from GDYendell August 15, 2025 16:28
@GDYendell GDYendell merged commit 1294694 into main Aug 18, 2025
18 checks passed
@GDYendell GDYendell deleted the 146_raise_exception_scan_command branch August 18, 2025 10:28
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.

Exceptions in wrapped methods are not visible

2 participants