radiocosmology / alpenhorn

Alpenhorn is a service for managing an archive of scientific data.
MIT License
2 stars 1 forks source link

Show a better error message on bad arguments in `sync` (fix #47) #99

Closed cubranic closed 5 years ago

cubranic commented 5 years ago

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.

jrs65 commented 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 :)

cubranic commented 5 years ago

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.

jrs65 commented 5 years ago

Yeah. Agreed, it would be good to have a uniform way of doing this.