I'm using the latest version FoxBin2Prg v1.19.42.
When using the convertion from text to binary file (prg2bin) with an external command, errors are not returned properly to the calling command.
You can reproduce the error by downloading the attached file "_errorreport.zip", unpacking it and running the batch script runfoxbin2prg.cmd.
The third test (subdirectory test3) tries to compile the text version of a simple form and fails.
Comments: ** Comment from web user: fdbozzo **
Hi Ralf:
Nice tests, thanks!
About errors not shown when an invalid sc2 is used, may be I should explain this case with an example that you can verify:
- In test 4a, the form "prg2bin-broken-a\form1.sc2" is a "valid" sc2 file! It have just duplicated objects, but it is valid, and that's whi only generate a log without messagebox.
- If you want to test an "invalid" sc2, then broke their structure, in example, comment the last "ENDPROC" and now you have a real broken sc2 that will generate a true error with messagebox.
Apart from that, there are 2 aspects you must know:
- By default, FoxBin2Prg only show true errors when processing, not managed ones or notifications.
- Using the 5ft.parameter "cDontShowErrors" with 0 or 1, you control if you want a messagebox when an error occurs or not
- Independently of this setting, using the keyword "SHOWMSG" show error (true and managed) and notifications, so in the case you use cDontShowErrors=1 and SHOWMSG, errors are shown anyway and notifications too.
This difference in on-line parameters are because when using FoxBin2Prg from a Windows showrtcut, in the shortcut you only can use this notation:
```
"<path>\program.exe some-parameters" %1
```
And %1 is replaced with a full file path name when "SendingTo" FoxBin2Prg. So I have this limitation and that's why I created those online parameters in one string as "BIN2PRG-SHOWMSG-INTERACTIVE"
The second use case is when you call FoxBin2Prg from another program or script (like your example), then here you have more liberty to choose the parameters and the syntax, and now you can use all the external parameters that are next the filename, like:
```
call foxbin2prg.exe PRG2BIN prg2bin-broken-a\form1.sc2 0 0 0 1 1
```
The third use case is when using FoxBin2Prg as an object, and in this case you have full control of parameters and the internal API.
I think that using the external parameters you can do what you want.
Regards!
Fernando.-