On 11/19/2013 06:46 PM, Hubert Kario wrote:
>
>> ---
>> is the fatal error handling OK?
>
> No: by directly exiting, you are e.g. preventing any cleanups from
> running (and logs from uploading when run on beaker), unfortunately. My
> preference would be to just return a RC and let the user handle the
> failure e.g. with rlRun. Use journal logs for messages. It's done this
> way everywhere BL.
I'm assuming that by "RC" you mean "return code".
I'll change it to do rlLogFatal and "return big-n" on unrecoverable errors
then.
IMHO rlLogError would be better - it's used by other BeakerLib code
(rlLogFatal being never used). Also returning 0 for success and 1 for
fail (or 2/3/4/.. for special purposes) is widely accepted.
JJ