Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2002-07-30 21:27:11


That's std::runtime_error instead of the mis-entered std::runtime_exception,
which doesn't exist.

"Edward Diener" <eddielee_at_[hidden]> wrote in message
news:ai7b66$ff7$1_at_main.gmane.org...
> In the FAQ section to the regex documentation I read:
>
> "The library should throw only three types of exception:
> boost::bad_expression can be thrown by reg_expression when compiling a
> regular expression; boost::bad_pattern can be thrown by the class
> sub_match's conversion operators; finally std::bad_alloc can be thrown by
> just about any of the functions in this library."
>
> This appears to be incorrect as far as my own perusal of the code. The
> std::runtime_exception can be thrown in these general cases:
>
> 1) When a message catalog can not be opened.
> 2) When a file can not be opened.
>
> This translates into std::runtime_exception possibly being thrown in these
> end user situations:
>
> 1) When a message catalog is specified and regex uses the cpp_regex_traits
> and regex::imbue is called.
> 2) When a message catalog is specified and regex::assign is called.
> 3) When CRegex::GrepFiles or CRegex::FindFiles is called.
>
> I think it is important that the end user of the regex library understand
> very specifically when he should be ready to catch exceptions and I would
> like to see this documented more clearly.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk