#1453 Get wrong RC/result for an invalid HELP SERVICE request

All
closed-fixed
Sharon Lucas
5
2012-05-03
2012-05-03
Sharon Lucas
No

The HELP service\'s paraer for ERROR requests is not specifying that you need to specify the ERROR option. So, you get the following unhelpful RC and error message when you forget to specify the ERROR option:

C:\\>STAF local HELP SERVICE respool
Error submitting request, RC: 48
Additional info
---------------
269011240

Instead, should get the following RC and error message when you submit this incorrect request:

C:\\>STAF local HELP SERVICE respool
Error submitting request, RC: 7
Additional info
---------------
When specifying one of the options SERVICE, you must also specify one of the options ERROR

Which then reminds you that you forgot to specify the ERROR option and then you can submit the request you intended as follows:

C:\\>STAF local HELP SERVICE respool ERROR 4005
Response
--------
Description: Not resource pool entry owner
Details : You are not the owner of the entry you are trying to RELEASE. If a FORCE option is available for the request, use it if you are sure that the correct entry is specified.

Discussion

  • Sharon Lucas
    Sharon Lucas
    2012-05-03

    Here's a cvs diff of the fix:

    Index: stafproc/STAFHelpService.cpp

    RCS file: /cvsroot/staf/src/staf/stafproc/STAFHelpService.cpp,v
    retrieving revision 1.40
    diff -r1.40 STAFHelpService.cpp
    86a87,88
    > fErrorParser.addOptionNeed("SERVICE", "ERROR");
    >
    Index: test/STAFTest.xml
    ===================================================================
    RCS file: /cvsroot/staf/src/staf/test/STAFTest.xml,v
    retrieving revision 1.338
    diff -r1.338 STAFTest.xml
    1837a1838,1853
    > # Submit a request to the LOG service to make sure it has been loaded by the default service loader
    > [ 'STD:HELP', 'LOG', 'HELP',
    > [ STAFRC.Ok ], r'^.'
    > ],
    >
    > # Make sure you get RC 7 when you specify the SERVICE option without the ERROR option
    > [ 'STD:HELP', 'HELP', 'SERVICE LOG',
    > [ STAFRC.InvalidRequestString ], r'^.'
    > ],
    >
    > [ 'STD:HELP', 'HELP', 'SERVICE LOG ERROR 4004',
    > [ STAFRC.Ok ], None,
    > "STAFResult['description'] and " +
    > "STAFResult['details']"
    > ],
    >

     
  • Sharon Lucas
    Sharon Lucas
    2012-05-03

    • status: open --> closed-fixed