Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#240 Add an invalid argument major message code.

Rick McGuire
Error Codes (4)
Rick McGuire

A lot of error checking needs to make the decision between using error 40 for invalid call to routine vs error 93 for invalid call to method. This can be somewhat confusing, as functions are sometimes just passthroughs to methods, messages generally refer to argument position, which can shift when function calls are converted to method calls and the methods perform the argument checks.

It would be more convenient if there was a major error code for 'Invalid argument', with subcodes for the different common error conditions for arguments. All references to specific arguments should be by name, not by ordinal position.

It's not necessary that existing messages be converted over to these new errors, but it would be a good idea to start adding the new messages so they can be used for new development.


  • Rick McGuire
    Rick McGuire

    Logged In: YES
    Originator: YES

    This added a new 88 major code, plus a bunch of minor codes for common argument validation conditions. The messages in this category are restricted to problems with specific arguments. So no minimum argument/maximum argument messages, but there is a required argument message. There's the standard user message, plus a general message where the substitutions are the argument name and the reason it was bad.

    Over time, the intent will be to replace a lot of Error 40 and Error 93 messages issued by the interpreter with these new ones. When this is done, the arguments will be flagged by the documented argument name, not position number.



Cancel   Add attachments