Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2004-02-19 08:37:59


> Members of class reg_expression know where they are up to while compiling,
> but don't include that information when they throw. It can be pretty
> daunting to get the "Invalid regular expression" error message, with no
> indication of where to start looking, so I'd like to be more helpful.
Given
> the character offset from the start of the RE, I can put the cursor there.
> Any suggestions as to how to obtain that information?

Currently it can't be done, but you are right that is useful information: I
think the thing to do is put that in the exception class that gets thrown.
I'm working on a re-write of the regular expression construction code now,
so if you're patient I'll add it to my todo list, if not you'll have to add
it yourself to the existing code (look at reg_expression<charT, traits,
Allocator>::fail which handles all failed expression compiles).

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net