Skip to content

ARTDAQSupervisor: improved python error propagation#343

Merged
rrivera747 merged 8 commits intodevelopfrom
sc/ARTDAQSupervisorPythonErrors
Feb 19, 2026
Merged

ARTDAQSupervisor: improved python error propagation#343
rrivera747 merged 8 commits intodevelopfrom
sc/ARTDAQSupervisorPythonErrors

Conversation

@corrodis
Copy link
Contributor

More work on python error propagation - I think this was really limiting us in today's efforts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves Python error propagation in the ARTDAQSupervisor component by replacing direct error printing with structured error capture and propagation mechanisms. The changes enable better error diagnostics and debugging when Python/C API calls fail during DAQInterface initialization and operation.

Changes:

  • Replaced PyErr_Print() calls with checkPythonError() + capturePyErr() pattern for better error capture
  • Added error handling for DAQInterface constructor failures
  • Added defensive null pointer check before using daqinterface_ptr_
  • Modified captureStderrAndStdout_() to preserve pending Python errors
  • Added MongoDB certificate file validation in startup script

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/ots Added MongoDB certificate validation checks and minor whitespace adjustment
otsdaq/ARTDAQSupervisor/ARTDAQSupervisor.cc Improved Python error handling throughout - replaced PyErr_Print() with capturePyErr(), added DAQInterface constructor error checking, added null pointer safety check, and prevented error consumption in captureStderrAndStdout_()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@rrivera747 rrivera747 left a comment

Choose a reason for hiding this comment

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

Looks good (after whitespace cleanup)

rrivera747 and others added 2 commits February 19, 2026 10:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rrivera747 rrivera747 merged commit 2c897cd into develop Feb 19, 2026
11 checks passed
@rrivera747 rrivera747 deleted the sc/ARTDAQSupervisorPythonErrors branch February 19, 2026 16:12
@github-project-automation github-project-automation bot moved this from 📋 Triage to 🎉 Done in art-daq Work Tracker Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants