process icon indicating copy to clipboard operation
process copied to clipboard

callProcess exception undocumented

Open no-longer-on-githu-b opened this issue 9 years ago • 7 comments

The docs say that callProcess throws an exception when the process returns non-zero. It is not documented what type of exception this is and therefore this API is pretty much useless. Please consider documenting the exception type or adding a new API that returns the status code instead.

no-longer-on-githu-b avatar Apr 20 '16 19:04 no-longer-on-githu-b

A PR for a doc improvement would definitely be appreciated.

On Wed, Apr 20, 2016 at 10:26 PM, rightfold [email protected] wrote:

The docs say that callProcess throws an exception when the process returns non-zero. It is not documented what type of exception this is and therefore this API is pretty much useless. Please consider documenting the exception type or adding a new API that returns the status code instead.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/haskell/process/issues/60

snoyberg avatar Apr 20 '16 19:04 snoyberg

Similar problems exist with most other functions exported by this module.

no-longer-on-githu-b avatar Apr 20 '16 19:04 no-longer-on-githu-b

@snoyberg I'll see what I can do :) but it won't be today, probably somewhere this weekend

no-longer-on-githu-b avatar Apr 20 '16 19:04 no-longer-on-githu-b

Same. “an Exception is thrown” is hardly very helpful documentation.

Profpatsch avatar Dec 18 '16 19:12 Profpatsch

I’d create a PR if I could find the origin of OtherError.

Profpatsch avatar Dec 18 '16 19:12 Profpatsch

It's generated by processFailedException, which is used in a few functions in System.Process.

snoyberg avatar Dec 19 '16 04:12 snoyberg

Yes, that is pretty clear with a search, but there is no definition of OtherError anywhere, and Hoogle/Hayoo can’t find any as well.

Profpatsch avatar Dec 20 '16 10:12 Profpatsch