Boost logo

Boost :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2004-07-17 17:22:30


I'm getting a "stop the script" error when running the test for
testfacet_dll (VC7.1)
it pops up a requestor telling me the program terminated unexpectedly, and
(unfortunately) waits for a human reply (which causes my scheduled run to
stop after 4 hours (it starts at 0300 local)), so I'm not getting the rest
of the tests run.
I chased it down to a std:exception w/ what() == bad cast
I'm refining where the error occurs.
with the following patches to testfacet.cpp:

RCS file: /cvsroot/boost/boost/libs/date_time/test/gregorian/testfacet.cpp,v
retrieving revision 1.14
diff -w -r1.14 testfacet.cpp
11c11
<

---
 > #include <exception>
39a40,41
 > try
 > {
264a267,268
 >     try
 >     {
265a270,272
 >     }
 >     catch(std::exception& e) {check(e.what(), false);}
 >     catch(...) {check("some unknown exception found", false);}
317d323
<
319d324
<
321c326,328
<
---
 > catch(std::exception& e) {check(e.what(), false);}
 > catch(...) {check("some unknown exception found", false);}
 > }
========================================================================
I get the following output when I run it from the command line
C:\Projects\boost\status>..\bin\boost\libs\date_time\test\testfacet_dll.test\vc7.1\debug\testfacet_dll
Pass :: check german short month: Okt
Pass :: check german short month: Okt
Pass :: check ymd: 01.Okt.2002
Pass :: ostream low level check string:01.Okt.2002
global: C
Pass :: no registered facet here
Pass :: facet registered here
Pass :: check string imbued ostream: 2002-Okt-01
Pass :: check string imbued ostream: +unbegrenztheit
Pass :: check string imbued ostream: +unbegrenztheit
Pass :: check string imbued ostream: NichtDatumzeit
Pass :: check any old ostream: 2002-Oct-01
Pass :: check date order: 01.10.2002
Pass :: check date order: 2002 Okt 01
Pass :: check date order: Oktober 01 2002
Pass :: check date period: [Oktober 01 2002/Oktober 03 2002]
Pass :: date_duration stream out
Pass :: date_duration stream out
Pass :: partial date stream out
Pass :: nth kday of month
Pass :: first kday of month
Pass :: last kday of month
Pass :: first kday after
Pass :: first kday after
26 Jun
second Fri of Sep
first Sat of May
last Mon of Aug
Thu after
Tue before
FAIL :: bad cast
FAIL :: Stream in month
FAIL :: bad cast
C:\Projects\boost\status>
==================================================================================
the log appears to show that this test PASSED tho.....
execute-test 
..\bin\boost\libs\date_time\test\testfacet_dll.test\vc7.1\debug\testfacet_dll.run
         1 file(s) copied.
**passed** 
..\bin\boost\libs\date_time\test\testfacet_dll.test\vc7.1\debug\testfacet_dll.test
==================================================================================
I'm working on getting some better "catch unknown exception" code put 
together so it can be added readily to tests to keep this from happening in 
the future.
Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law" 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk