Boost logo

Boost Users :

Subject: Re: [Boost-users] Fwd: Boost Math error
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-09-15 05:07:21


> I am a complete newbie with handling Boost errors . i am receiving an
> error while running a python code which i am working on one of my projects
> .. i am unable to make way on how to handle this problem ..
> Can someone put some feedback regarding this ..
> ____________________________________________________________-
>
> Uterminate called after throwing an instance of
> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::rounding_error>
>>'
> what(): Error in function boost::math::iround<d>(d): Value
> 3.3559013980333227e+163 can not be represented in the target integer type.
> Aborted

As the error message says - the code was trying to convert
3.3559013980333227e+163 to an integer - and since that won't fit, it threw
the error.

All of Boost.Math's exception types inherit from std::runtime_error, so a
catch() for that wouldn't go amiss ;-)

It would also help to know what call resulted in this error - it looks like
the kind of thing you shouldn't normally see (unless the arguments to some
function were well out of the range our functions can cope with).

HTH, 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