Exit Code

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
dpbevin
Posts: 4
Joined: Wed Jul 08, 2009 2:43 pm

Exit Code

Unread post by dpbevin »

When calling helpman.exe from the command line there is supposed to be an exit code returned. I've seen on another topic that 0 is success, and 1 is error.

Under what circumstances does helpman.exe return an error?

I've recently built a project with missing sections (which have been logged to the log file) but helpman.exe returns an exit code of 0. This does not seem right to me.

I'm using 5.2.0 build 880.

The following is an extract from the output log file:
[Error] Topic Hardware Trouble Shooting Guide does not exist or cannot be read.
[Error] Topic Viewing Data does not exist or cannot be read.
[Warning] Topic Using_the_FS_Help_File references an undefined topic: "Flow_Station_User_Interfaces"
[Warning] Topic Station_View references an undefined anchor: "#Station_Type" in topic Station
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Unread post by Alexander Halser »

Help & Manual returns an error code of 1 when it cannot successfully compile the output file. If you get a compiled CHM file at the end (compilation completed), the error code is 0.
Alexander Halser
Senior Software Architect, EC Software GmbH
dpbevin
Posts: 4
Joined: Wed Jul 08, 2009 2:43 pm

Exit Code

Unread post by dpbevin »

You're saying that my batch file has to analyze every log file and search for [warning] or [error]?

Why would an error (in the log file) not abort generation of the CHM (or PDF, etc.) file? Isn't that the whole point of an error?
mmueller
Posts: 154
Joined: Fri Oct 10, 2008 10:20 am
Location: Germany
Contact:

Unread post by mmueller »

Alexander,

I suggest to implement different exit codes, e.g.

0 = everything ok
1 = could not compile
2 = missing topic
3 = ...

Thus, it would be possible to check within a batch, e.G
if %errorlevel%...
Best Regards,

Michael Müller
H&M 6.0.2 Build 2352
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Hi Michael,

Update: The programmers have put this on the official Wish List. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply