apertium/apertium-anaphora

Module always exits with exit code "1"

Closed this issue · 7 comments

The program seems to be exiting with code "1" regardless of the situation. With blank input, it exits with code "1", and with correct Apertium input, it finds the correct referents and adds them in the output, yet still exits with code "1". If no problem is found, the module should be exiting with code "0".

Thanks!

@marcriera thanks for pointing this out!
I changed the default exit to 1 and if there's an error it returns with 0. (Although it doesn't have very sophisticated error handling yet, i.e. it still assumes that the stream given from the previous module in the pipeline is the correct Apertium-stream format)

488a6fc

default exit to 1 and if there's an error it returns with 0

other way around, right? (In Unix, 0 is success, and anything above 0 is failure, because there are so many ways things can go wrong and so few ways in which they can go right.)

@unhammer that is the convention I was aware of too but I thought maybe there's a different convention here?

What's the final one? I'll change it to that.

0: no error

1 (or anything over 1): error

@khannatanmai Thanks for looking into this!

@unhammer I just realised, I changed it to 0 for no error only that was a typo in my earlier comment. Yep, it's 0 for no error :)

@marcriera Thanks for pointing it out :) Closing issue!