Error handling in plugins

May 30, 2008
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.
 
I published the EVENT plugin with source code. If you download it from
the JPsoft website, you'll get the source.

-Scott

"p.f.moore" <> wrote on 07/09/2008 11:02:26 AM:


> 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.
>
 
2008/7/9 samintz <>:

> I published the EVENT plugin with source code. If you download it from
> the JPsoft website, you'll get the source.

Thanks, I'll take a look.
Paul.
 

Similar threads