jclouds / legacy-jclouds-cli

https://jclouds.apache.org
Apache License 2.0
17 stars 5 forks source link

Disambiguate return codes from jclouds-cli #36

Closed amoghe closed 11 years ago

amoghe commented 11 years ago

When trying certain operations that are guaranteed to error out (eg - try creating a container with a name that already exists), the cli exits with status:1 (eg - exception: "Could not create container"). If we could disambiguate the return code, we could provide the user with enough information to "fix" his/her problem (eg - retry with a different name on EEXIST).

amoghe commented 11 years ago

Adding some more examples of what might be useful:

gaul commented 11 years ago

jclouds-cli 1.5.7 will translate AuthorizationException to EACCES, ContainerNotFoundException and FileNotFoundException to ENOENT, and IOException to EIO. Please open new issues for specific commands which could communicate a more precise exit code.