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

[FEATURE REQUEST]: Spice interface error handling options #200

Open
jo11he opened this issue Dec 9, 2024 · 0 comments
Open

[FEATURE REQUEST]: Spice interface error handling options #200

jo11he opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jo11he
Copy link
Collaborator

jo11he commented Dec 9, 2024

The load_kernel function (https://py.api.tudat.space/en/latest/spice.html#tudatpy.interface.spice.load_kernel) that exposes the furnsh_c routine from SPICE does not allow the user to do any error handling. When sued in a try-except block in a python script, any exceptions occurring in the CSPICE routine is not being caught. Instead, the program crashes with the following message:

================================================================================

Toolkit version: N0067

SPICE(NOSUCHFILE) --

The attempt to load "S19TIGE2006_075_2006_079.CKF" by the routine FURNSH
failed. It could not be located.

A traceback follows. The name of the highest level module is first.
furnsh_c --> FURNSH --> ZZLDKER

Oh, by the way: The SPICELIB error handling actions are USER-TAILORABLE. You
can choose whether the Toolkit aborts or continues when errors occur, which
error messages to output, and where to send the output. Please read the ERROR
"Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRPRT.

================================================================================

I do not know what exactly needs to be done to enable the error to be caught in a try-except block, but if it is easily attainable, it may be a good feature to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant