[complement-svn] SF.net SVN: complement: [1554] trunk/complement/explore/test/mt/mt_test.cc
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-03-12 18:26:13
|
Revision: 1554 http://svn.sourceforge.net/complement/?rev=1554&view=rev Author: complement Date: 2007-03-12 11:26:06 -0700 (Mon, 12 Mar 2007) Log Message: ----------- catch error (exception) here Modified Paths: -------------- trunk/complement/explore/test/mt/mt_test.cc Modified: trunk/complement/explore/test/mt/mt_test.cc =================================================================== --- trunk/complement/explore/test/mt/mt_test.cc 2007-03-12 18:25:09 UTC (rev 1553) +++ trunk/complement/explore/test/mt/mt_test.cc 2007-03-12 18:26:06 UTC (rev 1554) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/19 14:36:01 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 20:39:47 ptr> /* * Copyright (c) 2006, 2007 @@ -803,12 +803,16 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; - xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); - fcnd_ch.set( true ); - nm_ch.release<xmt::__Condition<true> >( ObjName ); - + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; + xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); + fcnd_ch.set( true ); + nm_ch.release<xmt::__Condition<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } exit( 0 ); } catch ( xmt::fork_in_parent& child ) { @@ -825,12 +829,17 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; - xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); - fcnd_ch.set( true ); - nm_ch.release<xmt::__Condition<true> >( ObjName ); - + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; + xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); + fcnd_ch.set( true ); + nm_ch.release<xmt::__Condition<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } + exit( 0 ); } catch ( xmt::fork_in_parent& child ) { @@ -848,11 +857,16 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Barrier<true>,1> shm_ch; - xmt::__Barrier<true>& b_ch = nm_ch.named<xmt::__Barrier<true> >( ObjName ); - b_ch.wait(); - nm_ch.release<xmt::__Barrier<true> >( ObjName ); + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Barrier<true>,1> shm_ch; + xmt::__Barrier<true>& b_ch = nm_ch.named<xmt::__Barrier<true> >( ObjName ); + b_ch.wait(); + nm_ch.release<xmt::__Barrier<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } exit( 0 ); } @@ -866,6 +880,9 @@ catch ( xmt::shm_bad_alloc& err ) { BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } } /* ****************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |