Changed no-exception behaviour to call throw_exception directly so that the handler sees the actual error message.

[SVN r20361]
This commit is contained in:
John Maddock
2003-10-13 11:45:11 +00:00
parent ff1c0a0bb5
commit 54e9a2fbcb
4 changed files with 12 additions and 35 deletions

View File

@ -236,15 +236,12 @@ void BOOST_REGEX_CALL w32_traits_base::do_init()
if(*regex_message_catalogue)
{
hresmod = LoadLibraryA(regex_message_catalogue);
#ifndef BOOST_NO_EXCEPTIONS
if(hresmod == NULL)
{
std::string s("Unable to open dll: ");
throw std::runtime_error(s + regex_message_catalogue);
std::runtime_error err(s + regex_message_catalogue);
boost::throw_exception(err);
}
#else
BOOST_REGEX_NOEH_ASSERT(hresmod != NULL);
#endif
}
unsigned int i;
for(i = 0; i < REG_E_UNKNOWN; ++i)