OVERVIEW
Currently, most errors are handled within tools by returning strings like "ERROR: ...". This is then returned by bitbox.py as the tool result with an exit value of 0, masking a failure as a success.
PROPOSAL
Tools should explicitly raise exceptions on failure. The exception message can be captured and returned in stderr, while a return code of 1 flags an error to the calling process.
OVERVIEW
Currently, most errors are handled within tools by returning strings like "ERROR: ...". This is then returned by bitbox.py as the tool result with an exit value of 0, masking a failure as a success.
PROPOSAL
Tools should explicitly raise exceptions on failure. The exception message can be captured and returned in stderr, while a return code of 1 flags an error to the calling process.