#747 Name of a file not found missing from RexxCondition

v4.0
closed
APIs (66)
5
2012-08-14
2009-07-01
No

When invoking a program with the ThreadContext CallProgram API and that program is not found,
the name of the missing program is not in the RexxCondition structure. The Program name is also
missing from the returned error message.

Below is the code I use when an error is detected:

RexxObjectPtr retObj = threadContext->CallProgram(progName, argArray);
if (retObj == NULLOBJECT) {
if (threadContext->CheckCondition()) {
RexxDirectoryObject cond = threadContext->GetConditionInfo();
RexxCondition info;
threadContext->DecodeConditionInfo(cond, &info);
CSTRING condName = threadContext->StringData(info.conditionName);
CSTRING progName = threadContext->StringData(info.program);
fprintf(stderr,"%s condition raised in %s at %d\n", condName, progName, info.position);
CSTRING condMsg = threadContext->StringData(info.message);
fprintf(stderr, "Code: %d Message: %s\n", info.code, condMsg);
rc = -1;
}
}

Here is a sample of the output produced by the above code:
SYNTAX condition raised in at 0
Code: 3901 Message: Failure during initialization: Program "" was not found

When I issue the command "Rexx missingfile", the name od the missing file
is present in the error messages.

Discussion

  • Rick McGuire

    Rick McGuire - 2009-07-01

    Committed revision 4866.

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-02-19

    The fix for this item was in the 4.0.0 release.

     


Anonymous

Cancel  Add attachments