|
From: <rus...@us...> - 2008-05-26 10:22:50
|
Revision: 141
http://gearbox.svn.sourceforge.net/gearbox/?rev=141&view=rev
Author: russo2503v
Date: 2008-05-26 03:22:58 -0700 (Mon, 26 May 2008)
Log Message:
-----------
not setting status fault when the thread is stopping
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.cpp
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.h
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.h
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.cpp 2008-05-08 08:10:39 UTC (rev 140)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.cpp 2008-05-26 10:22:58 UTC (rev 141)
@@ -46,9 +46,12 @@
ss << "SafeThread::run(): Caught unexpected unknown exception.";
}
- // only if there were exceptions
- if ( !ss.str().empty() ) {
- tracer_.error( ss.str() );
+ // report error if there was an exception and we are not stopping
+ if ( !ss.str().empty() ) {
+ if ( !isStopping() )
+ tracer_.error( ss.str() );
+ else
+ tracer_.debug( ss.str(), 4 );
}
else {
tracer_.debug( "dropping out from run()", 4 );
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.h 2008-05-08 08:10:39 UTC (rev 140)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/safethread.h 2008-05-26 10:22:58 UTC (rev 141)
@@ -20,8 +20,8 @@
/*!
@brief A version of the Thread class which catches all possible exceptions.
-If a stray exception is caught, an error message will be printed
-(using cout), then we will wait for someone to call stop().
+If an exception is caught when the thread is not stopping, an error trace message
+will be printed. Then the thread wil wait for someone to call stop().
To use this class, simply implement the pure virtual walk() function.
@verbatim
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp 2008-05-08 08:10:39 UTC (rev 140)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp 2008-05-26 10:22:58 UTC (rev 141)
@@ -52,8 +52,8 @@
ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected unknown exception.";
}
- // only if there were exceptions
- if ( !ss.str().empty() )
+ // report status fault if there was an exception and we are not stopping
+ if ( !ss.str().empty() && !isStopping() )
{
tracer_.error( ss.str() );
subStatus().fault( ss.str() );
@@ -62,6 +62,6 @@
tracer_.debug( subsysName()+": dropping out from run() ", 4 );
}
- // wait for the component to realize that we are quitting and tell us to stop.
+ // wait for somebody to realize that we are quitting and tell us to stop.
waitForStop();
}
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.h 2008-05-08 08:10:39 UTC (rev 140)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.h 2008-05-26 10:22:58 UTC (rev 141)
@@ -22,8 +22,8 @@
/*!
@brief A version of the Thread class which catches all possible exceptions and integrates some Status operations.
-If a stray exception is caught, an error message will be printed
-(using cout), then we will wait for someone to call stop().
+If an exception is caught when the thread is not stopping, a status fault is issued.
+Then the thread will wait for someone to call stop().
To use this class, simply implement the pure virtual walk() function.
@verbatim
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|