talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia-labs.github.io/talaia.watch/
MIT License
136 stars 63 forks source link

Fix error handling in CLI #225

Closed optimm closed 1 year ago

optimm commented 1 year ago

Some CLI errors were printed using println! , causing them to be indistinguishable from regular output. To resolve this, the code has been updated to use eprintln! and exit code 1 for error messages. By printing errors to the standard error, error messages are now clearly separated from regular output.

sr-gi commented 1 year ago

Add a description / rationale for the change

sr-gi commented 1 year ago

Looks good, but I think it may be worth creating a function to encapsulate the printing + exit logic.

@optimm any progress on this?

optimm commented 1 year ago

Looks good, but I think it may be worth creating a function to encapsulate the printing + exit logic.

@optimm any progress on this?

Will make the required changes today

sr-gi commented 1 year ago

ACK 380c0d9

sr-gi commented 1 year ago

@optimm we require commits to be signed in order to be merged to master. Check the docs on how to sign commits and rebase