Open beckermr opened 3 years ago
cc @mingwandroid for viz
This was previously brought up in the community meeting and I just want to raise that this is a good idea and should instead be using a way that allows programmatic access to some of the internals. sys.exit
is in my experience not a great way to handle runtime errors or even just code dead ends.
Hi there, thank you for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment.
Thanks!
Not stale.
What is the idea?
We here at conda-forge use some of the conda build APIs for our work. The code has been getting an increasing number of
sys.exit
calls for errors, which are causing our jobs to die.Instead, maybe the code should raise an error and then catch it at the highest level and call sys.exit? This preserves the internals for others while maintaining the same behavior.
Why is this needed?
sys.exit
calls are harder to catch/debug when using conda_build as an API.What should happen?
Review and ideally remove all
sys.exit
calls.Additional Context
_Originally posted by @beckermr in https://github.com/conda/conda-build/pull/5237#discussion_r1528736514_