boost::posix_time::duration_from_string throws std::out_of_range

Hi, I just noticed that boost::posix_time::duration_from_string throws std::out_of_range when I pass empty string to it. This seems like a bug, IMHO it should throw boost::bad_lexical_cast as it does for any other problem with the input. Thanks, George

On Fri, Apr 10, 2015 at 6:16 PM, George Georgiev < george.georgiev.sf@gmail.com> wrote:
Hi,
I just noticed that boost::posix_time::duration_from_string throws std::out_of_range when I pass empty string to it. This seems like a bug, IMHO it should throw boost::bad_lexical_cast as it does for any other problem with the input.
Please file a bug against boost date_time at https://svn.boost.org/trac/boost/newticket
Feel free to assign it to me -- Marshall

Hi, When I try to load the page to file the ticket I receive: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/api.py", line 440, in send_error data, 'text/html') File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/chrome.py", line 827, in render_template message = req.session.pop('chrome.%s.%d' % (type_, i)) File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/api.py", line 216, in __getattr__ value = self.callbacks[name](self) File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/main.py", line 300, in _get_session return Session(self.env, req) File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/session.py", line 198, in __init__ self.get_session(sid) File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/session.py", line 225, in get_session self.bake_cookie() File "/usr/lib/python2.6/site-packages/Trac-0.12.2-py2.6.egg/trac/web/session.py", line 206, in bake_cookie assert self.sid, 'Session ID not set' AssertionError: Session ID not set Is this a problem with my network, or the website is currently down? Thanks, George On Fri, Apr 10, 2015 at 11:37 PM, Marshall Clow <mclow.lists@gmail.com> wrote:
On Fri, Apr 10, 2015 at 6:16 PM, George Georgiev < george.georgiev.sf@gmail.com> wrote:
Hi,
I just noticed that boost::posix_time::duration_from_string throws std::out_of_range when I pass empty string to it. This seems like a bug, IMHO it should throw boost::bad_lexical_cast as it does for any other problem with the input.
Please file a bug against boost date_time at https://svn.boost.org/trac/boost/newticket
Feel free to assign it to me
-- Marshall
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
George Georgiev
-
Marshall Clow