ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
22 stars 32 forks source link

Unify CLI exit codes #267

Open joshmoore opened 4 years ago

joshmoore commented 4 years ago

The exit codes used throughout the CLI plugins are assigned randomly. Though it would be a breaking change, it would be useful to define a much smaller number of codes that users can expect.

see:

options:

Additionally as seen in https://github.com/ome/openmicroscopy/pull/6003#issuecomment-713445137 values should be reduced to less than 256.

manics commented 4 years ago

A starting point (and non-breaking change) could be a top-level enum that defines ALL allowed error codes in omero-py? i.e. an omero version of the Python errno module. <Edit actually ready your description properly now and you've already said this :-) >

joshmoore commented 4 years ago

I'd think that'd be a good addition, but I imagine plugins will need the ability to add. (i.e. not an enum but a registry)