I forgot about something...

Both the compiling and excecuting functions of the interface the plugin 
is using return somewhat more detailed errors. There's a function which 
returns the text based on the error codes so I could either revamp the 
error codes returned by the plugin so that they'd be more informative 
for the people willing to look up the error codes or provide a new 
service which returns full error strings when you give it an expression 
which doesn't compute. Other ideas are welcome as well.

Here are the erorrs (nothing too useful IMO):

enum {
   REG_ASSERT = 1,  /* internal error ? */
   REG_BADBR,       /* invalid repeat counts in {} */
   REG_BADPAT,      /* pattern error */
   REG_BADRPT,      /* ? * + invalid */
   REG_EBRACE,      /* unbalanced {} */
   REG_EBRACK,      /* unbalanced [] */
   REG_ECOLLATE,    /* collation error - not relevant */
   REG_ECTYPE,      /* bad class */
   REG_EESCAPE,     /* bad escape sequence */
   REG_EMPTY,       /* empty expression */
   REG_EPAREN,      /* unbalanced () */
   REG_ERANGE,      /* bad range inside [] */
   REG_ESIZE,       /* expression too big */
   REG_ESPACE,      /* failed to get memory */
   REG_ESUBREG,     /* bad back reference */
   REG_INVARG,      /* bad argument */
   REG_NOMATCH      /* match failed */
};

Sheri wrote:
> On the subject of erroneous patterns, there are descriptive errors
> available from pcre_compile2() which would be much more useful that
> the "8" currently provided by the plugin.
...

Reply via email to