Error Handling

As soon as something goes wrong when processing a request, an error is generated and put into the response document. The status of the response will be set to "Error" or "Warning" depending on the severity of the error. In case of an error, processing will abort immediately, while in case of a warning processing continues.

An error has the following format:

<Error Id=”12345”>
  <Severity>Error/Warning</Severity>
  <Description>Short description</Description>
  <ExternalDescription>An external error text if available</ExternalDescription>
</Error>
<ValidateErrors>
  <ValidateError LineNo="logic_line_no" ArgumentNo="argument_no">
    <Severity>Error/Warning</Severity>
    <Id>syntax_error_id</Id>
    <Description>error description</Description>
    <Details>additional details</Details>
  </ValidateError>
    . . .
    . . .
</ValidateErrors>

Example response when trying to validate a constant with a non exisiting data dictionary:

<ProLinga>
  <Validate Version="1.0">
    <Command Name="Validate" Mode="Response" Status="Error">
      <Object Application="Advance" Type="Constant" Name="Test2">
        <Error Id="30010">
          <Severity>Error</Severity>
          <Description>Contains Validate Errors</Description>
          <ExternalDescription></ExternalDescription>
        </Error>
        <ValidateErrors>
          <ValidateError LineNo="0" ArgumentNo="1">
           <Severity>Error</Severity>
           <Id>40009</Id>
           <Description>Invalid Data Dictionary Name</Description>
           <Details>Namexxx</Details>
          </ValidateError>
        </ValidateErrors>
      </Object>
    </Command>
  </Validate>
</ProLinga>

The "External" element will contain any error text passed on from the O/S or 3rd party products.

The following errors are defined:

Table 2. Errors

Error IdSeverityDescription
30000OkNo Error
30001ErrorError parsing document
30002ErrorEmpty document
30003ErrorInvalid root element
30004ErrorInvalid validate XML file
30005WarningNo document match
30006WarningDocument not found
30007WarningDocument already deleted
30008ErrorCan not parse return string
30009ErrorCan not write document to repository
30010ErrorContains Validate Errors
30011ErrorInvalid object document layout
30012WarningObject does not need to be validated

The following 4GL Syntax errors are defined:

Table 3. 4GL Syntax Errors

Error IdSeverityDescription
40000OkNo Error
40001ErrorNo language validation document
40002ErrorInvalid logic command
40003ErrorInvalid number of arguments
40004ErrorInvalid argument
40005ErrorValid argument, invalid as closing argument
40006ErrorStructure control command defined outside structure
40007ErrorStructure close command defined outside structure
40008ErrorMissing structure close command
40009ErrorInvalid Data Dictionary name
40010ErrorInvalid Record name
40011ErrorInvalid Index Name
40012ErrorInvalid Data Source Name
40013ErrorInvalid Logic Name