- May
- 120
- 1
What is best practice for argument validation in plugins? If I have a
plugin command with arguments, say
MYPLUGIN [/A] [/B arg]
how should I handle an unexpected argument /D? (Built in commands seem
to report a (Sys) error including the incorrect flag, how do I
replicate this?) What about /B with a missing argument, or /A with
extra arguments?
If anyone has published a plugin with source which could serve as an
example of argument handling good practice, that would be brilliant!
Paul.
plugin command with arguments, say
MYPLUGIN [/A] [/B arg]
how should I handle an unexpected argument /D? (Built in commands seem
to report a (Sys) error including the incorrect flag, how do I
replicate this?) What about /B with a missing argument, or /A with
extra arguments?
If anyone has published a plugin with source which could serve as an
example of argument handling good practice, that would be brilliant!
Paul.