Boost logo

Boost Users :

From: Keith MacDonald (boost_at_[hidden])
Date: 2004-02-19 09:14:50


Yes, adding the current position to the bad_expression exception would be
the most helpful solution, for my application. As it's now on your TODO
list, my users will just have to be patient, or more careful ;-)

Thanks,
Keith MacDonald

"John Maddock" <john_at_[hidden]> wrote in message
news:02b501c3f6ed$9db85050$f0c46b51_at_fuji...
> > 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