rc after error message

Report any Hollywood bugs here
Post Reply
polluks
Posts: 10
Joined: Mon Jan 24, 2022 11:18 pm
Contact:

rc after error message

Post by polluks »

Hi!
After "Cannot open codesets.library" you get rc=0 :roll:

Regards,
Stefan
Hollywood 9.1:
MorphOS 3.18
macOS 15.1
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: rc after error message

Post by airsoftsoftwair »

Hollywood currently never sets any DOS error code. What do you need this for?
polluks
Posts: 10
Joined: Mon Jan 24, 2022 11:18 pm
Contact:

Re: rc after error message

Post by polluks »

For example if you are using a Hollywood app in a shell script...
Hollywood 9.1:
MorphOS 3.18
macOS 15.1
plouf
Posts: 580
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: rc after error message

Post by plouf »

Error() , is any help to what are you trying to do ?
Christos
polluks
Posts: 10
Joined: Mon Jan 24, 2022 11:18 pm
Contact:

Re: rc after error message

Post by polluks »

plouf wrote: Sun Oct 22, 2023 4:06 pm Error() , is any help to what are you trying to do ?
I see, but this workaround is laborious.
A shell or installer script should use
IF ERROR ...
Hollywood 9.1:
MorphOS 3.18
macOS 15.1
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: rc after error message

Post by airsoftsoftwair »

polluks wrote: Sun Oct 22, 2023 3:49 pm For example if you are using a Hollywood app in a shell script...
Hmm, yeah, might make sense to add this but then of course the question is if it should also return those codes in case of script runtime errors. Need to make up my mind about this.
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: rc after error message

Post by airsoftsoftwair »

Code: Select all

- Change: Hollywood sets the return code to 20 now whenever an error has occurred; this allows you to
  react on it when embedding Hollywood in batch scripts
Post Reply