How to know if Run() fails?

Anything related to Hollywood Designer goes in here
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to know if Run() fails?

Post by airsoftsoftwair »

plouf wrote: Sat Jul 12, 2025 3:51 pm however in Walkero's case the OS DID have some behaviour, complete lost in Hollywood
I don't quite get what you mean. What is the exact OS behaviour you expect in Walkero's case?
plouf
Posts: 666
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: How to know if Run() fails?

Post by plouf »

airsoftsoftwair wrote: Thu Jul 31, 2025 3:22 pm
plouf wrote: Sat Jul 12, 2025 3:51 pm however in Walkero's case the OS DID have some behaviour, complete lost in Hollywood
I don't quite get what you mean. What is the exact OS behaviour you expect in Walkero's case?
in a previous reply you said "i will see if can be standarized someway .."

personally i think that error code should be transparent forwarded to hollywod app , exactly waht OS returns
for example
Linux returns errorcode 127, what command fails/notfound
AmigaOS return 10 , if fails/notfound
etc

i.e. imho the hollywood script app, must forward returncode, from where OS store it, AS IS.. and not standarized like 1/2/3 constants
Christos
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to know if Run() fails?

Post by airsoftsoftwair »

plouf wrote: Sat Aug 02, 2025 8:31 pm personally i think that error code should be transparent forwarded to hollywod app , exactly waht OS returns
for example
Linux returns errorcode 127, what command fails/notfound
AmigaOS return 10 , if fails/notfound
etc

i.e. imho the hollywood script app, must forward returncode, from where OS store it, AS IS.. and not standarized like 1/2/3 constants
Ok, I've implemented this now. On Windows there is no standard return code in case the command isn't found. I've decided to just throw 127 as a return code on Windows in that case. On AmigaOS you'll get 10, though, so it's not 100% consistent but it's a very platform-specific thing anyway so I think it's ok.

Code: Select all

- New [Windows/Linux/macOS]: Execute() and Run() will now return code 127 in case the specified program
  couldn't be started because it wasn't found; note that this is different to the behaviour on AmigaOS and
  compatibles where you'll get return code 10 in case a program wasn't found; I've decided to keep the
  default OS behaviour in this case because return values of external programs are highly OS-dependent anyway
Post Reply