1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error handling in plugins

Discussion in 'Support' started by p.f.moore, Jul 9, 2008.

  1. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    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.
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,201
    Likes Received:
    11
    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:


     
  3. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    1
    2008/7/9 samintz <>:

    Thanks, I'll take a look.
    Paul.
     

Share This Page