How can i access the exception that fire handles?
- Dominant language
- Python
- Stars
- 28.2k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
I know that whether I am using a class or a function, fire will internally handle the exception and show the help if there is an issue.
So considering `fire_obj = fire.Fire(SomeClass)`, how can I access that exception from fire_obj? I know that fire_obj points to a new instance of SomeClass, but I am trying to capture and handle the exceptions that fire is handling internally when it shows the help or exceptions.
When I wrap it in a try except, I can see that the exception is `FireExit`, but I dont want the python-fire help message to print (which is printing from the code in the library). I want to instead raise my own exception, but even better, access the exception that happened inside `SomeClass` which is trigger the error.
@dbieber
Contributor guide
Assessment
This issue has not been assessed yet.