Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75663 - trunk/boost/chrono/io
From: vicente.botet_at_[hidden]
Date: 2011-11-25 18:38:24


Author: viboes
Date: 2011-11-25 18:38:23 EST (Fri, 25 Nov 2011)
New Revision: 75663
URL: http://svn.boost.org/trac/boost/changeset/75663

Log:
Chrono: added traces to try to catch sun/pathscale issue in time_point input/output
Text files modified:
   trunk/boost/chrono/io/time_point_io.hpp | 14 +++++++++++++-
   1 files changed, 13 insertions(+), 1 deletions(-)

Modified: trunk/boost/chrono/io/time_point_io.hpp
==============================================================================
--- trunk/boost/chrono/io/time_point_io.hpp (original)
+++ trunk/boost/chrono/io/time_point_io.hpp 2011-11-25 18:38:23 EST (Fri, 25 Nov 2011)
@@ -445,12 +445,24 @@
                 duration<double> d = tp - system_clock::from_time_t(t) + seconds(tm.tm_sec);
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
                 if (d.count() < 10) os << CharT('0');
+ if (! os.good()) {
+ std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
+ throw "exception";
+ }
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
                 std::ios::fmtflags flgs = os.flags();
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
- //os.setf(std::ios::fixed, std::ios::floatfield);
+ os.setf(std::ios::fixed, std::ios::floatfield);
+ if (! os.good()) {
+ std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
+ throw "exception";
+ }
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< " " << d.count() << std::endl;
                 os << d.count();
+ if (! os.good()) {
+ std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
+ throw "exception";
+ }
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< " " << d.count() << std::endl;
                 os.flags(flgs);
                 std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk