Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2375 - TeeRecompile returning non 0 when errors found
Summary: TeeRecompile returning non 0 when errors found
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Install (show other bugs)
Version: 30.200525
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-06 02:22 EDT by yeray alonso
Modified: 2020-10-08 04:24 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2020-10-06 02:22:43 EDT
For example, using the -source parameter with a path that has spaces in it but forgetting to add quotations around the path. 

When you launch TeeRecompile using ShellExecuteEx from a Delphi application in the Delphi debugger, you get a dialog box with:

“Project Spawned Process raised exception class ERecompileException with message ‘Folder with TeeChart source code cannot be found. (...) Compilation aborted.’

The error makes sense, however, when you continue and control comes back to the IDE, you find TeeRecompile process exit code was 0, instead of a non-zero value that would indicate an error.

A try..except would not work because exceptions don't get passed out to the calling code.

There could also be many other reasons for failures, like the IDE being open, etc, that TeeRecompile can’t proceed, and in that case it also currently returns 0.
Comment 1 yeray alonso 2020-10-07 04:02:31 EDT
You can use the -log parameter to try to capture errors, but you still have to provide a proper path for that.

The other issue with only using the log file is that since the log file contains all information about the actions that it's doing, you'll need to programmatically parse the log and look for the word Error, so that would require all encountered problems get written out with the word "Error".
Comment 2 yeray alonso 2020-10-08 04:24:09 EDT
Some other situations where the customer finds TeeRecompile could return non-zero exit codes when run with the -silent parameter:

- If the output folder does not exist, there is a dialog prompt asking to confirm creating it

- If there are old tchart files existing in the common library folder, there is a dialog prompt with "Old TeeChart Standard files found at:…"

- If the IDE is open, it prompts with "Please close RAD Studio…"