Strange behavior (return value 0) on error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behavior (return value 0) on error

mecanix
Hello, this is my first post on this forum.
One week ago I have posted a issue on github, but I think this forum is more indicated.

Please, can you have a look to :  issues 854 and give me a feedback ?

Thanx a lot in advance !
Victor
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior (return value 0) on error

ch007m
I'm not sure that you can grab the return value. Nevertheless, the exception that you report is related to the fact that Level 1 (=) can only be used for doctype=book
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior (return value 0) on error

mecanix
With bash, using $? you can know the exit code of the latest command :
(see http://stackoverflow.com/questions/90418/exit-shell-script-based-on-process-exit-code).

I understand the error but i do not understand why when "Error" is outputted, the exit code is 0 (success on most of OS).

Do you think this could be changed ?
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior (return value 0) on error

mecanix
Hello !

I am trying to implement fail-fast mode but I am really new in ruby and I need some advice :

How to abort processor (exception, exit, ...) ?
Where to write a function that will replace warn (helpers.rb) ?
How to access the command line options ?

Thank you in advance !