Closed cubranic closed 5 years ago
Fair point! After a while you get so used to reading python tracebacks it seems like the natural way to return an error :)
Before we release v2, we should also make an effort to got through the client code and settle on a uniform way to report errors. (We use both “print” and “click.echo”, and don’t always "exit(1)”.)
On Mar 12, 2019, at 9:33 AM, Richard Shaw notifications@github.com wrote:
Fair point! After a while you get so used to reading python tracebacks it seems like the natural way to return an error :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radiocosmology/alpenhorn/pull/99#issuecomment-472077820, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkrO1cpUK3BOffTZ3mbyXOqPXLeliWCks5vV9bNgaJpZM4bqxUs.
Yeah. Agreed, it would be good to have a uniform way of doing this.
Instead of raising an exception with a pile of traceback, it's friendlier to the user and conveys just as much detail to print out an error message and exit with status code 1.