Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63125 - trunk/libs/random/test
From: steven_at_[hidden]
Date: 2010-06-19 22:18:54


Author: steven_watanabe
Date: 2010-06-19 22:18:53 EDT (Sat, 19 Jun 2010)
New Revision: 63125
URL: http://svn.boost.org/trac/boost/changeset/63125

Log:
Better error reporting
Text files modified:
   trunk/libs/random/test/test_binomial.cpp | 12 +++++++++---
   1 files changed, 9 insertions(+), 3 deletions(-)

Modified: trunk/libs/random/test/test_binomial.cpp
==============================================================================
--- trunk/libs/random/test/test_binomial.cpp (original)
+++ trunk/libs/random/test/test_binomial.cpp 2010-06-19 22:18:53 EDT (Sat, 19 Jun 2010)
@@ -15,6 +15,7 @@
 #include <boost/random/mersenne_twister.hpp>
 #include <boost/math/distributions/binomial.hpp>
 #include <boost/lexical_cast.hpp>
+#include <boost/exception/diagnostic_information.hpp>
 #include <vector>
 #include <iostream>
 #include <numeric>
@@ -108,9 +109,14 @@
         ++argv;
     }
 
- if(do_tests(repeat, max_n, trials)) {
- return 0;
- } else {
+ try {
+ if(do_tests(repeat, max_n, trials)) {
+ return 0;
+ } else {
+ return EXIT_FAILURE;
+ }
+ } catch(...) {
+ std::cerr << boost::current_exception_diagnostic_information() << std::endl;
         return EXIT_FAILURE;
     }
 }


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