RetVal = !CORBA::is_nil( _FactoryNode->Component() ) ;
if ( RetVal ) {
if ( State() != SUPERV::SuspendedExecutingState ) {
- _FactoryNode->Component()->ping() ;
+ try {
+ _FactoryNode->Component()->ping() ;
+ }
+ catch( ... ) {
+ cdebug << "InNode::Ping() catched" << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
+ RetVal = false ;
+ }
}
else {
RetVal = false ;
ControlState( SUPERV::ToSuspendState ) ;
if ( IsFactoryNode() || IsComputingNode() ) {
if ( !CORBA::is_nil( Component() ) ) {
- RetVal = Component()->Suspend_impl() ;
+ try {
+ RetVal = Component()->Suspend_impl() ;
+ }
+ catch( ... ) {
+ cdebug << "InNode::Suspend() catched" << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
+ RetVal = false ;
+ }
if ( RetVal ) {
if ( IsRunning() ) {
cdebug << pthread_self() << "GraphExecutor::InNode::Suspend_impl " << Name()
if ( IsRunning() ) {
if ( IsFactoryNode() || IsComputingNode() ) {
if ( !CORBA::is_nil( Component() ) ) {
- RetVal = Component()->Kill_impl() ;
+ try {
+ RetVal = Component()->Kill_impl() ;
+ }
+ catch( ... ) {
+ cdebug << "InNode::Suspend() catched" << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
+ RetVal = false ;
+ }
cdebug << "Component()->Kill_impl() returns status " << RetVal << endl ;
RetVal = true ;
if ( IsRunning() ) {
if ( IsRunning() ) {
if ( IsFactoryNode() || IsComputingNode() ) {
if ( !CORBA::is_nil( Component() ) ) {
- RetVal = Component()->Stop_impl() ;
+ try {
+ RetVal = Component()->Stop_impl() ;
+ }
+ catch( ... ) {
+ cdebug << "InNode::Stop() catched" << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
+ RetVal = false ;
+ }
if ( RetVal ) {
if ( IsRunning() ) {
SendEvent( GraphExecutor::StopEvent ) ;
}
else if ( State() == SUPERV::SuspendedExecutingState ) {
if ( IsFactoryNode() || IsComputingNode() ) {
- RetVal = Component()->Resume_impl() ;
+ try {
+ RetVal = Component()->Resume_impl() ;
+ }
+ catch( ... ) {
+ cdebug << "InNode::Resume() catched" << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
+ RetVal = false ;
+ }
}
}
else if ( State() == SUPERV::SuspendedSuccessedState ) {
}
catch ( ... ) {
cdebug << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl() ERROR catched " << endl ;
+ State( SUPERV::ErroredState ) ;
+ _OutNode->State( SUPERV::ErroredState ) ;
cpu = 0 ;
}
}
}
int GraphExecutor::InNode::executeAction() {
- int oldRewindStack = ( _RewindStack > 101 ) ;
+ int oldRewindStack = ( _RewindStack > MAXSTACKTHREADSIZE ) ;
if ( !CreateNewThread() && oldRewindStack ) {
cdebug << pthread_self() << "/" << ThreadNo()
- << " executeAction start Thread _RewindStack " << _RewindStack << " > 101 CreateNewThread "
+ << " executeAction start Thread _RewindStack " << _RewindStack << " > "
+ << MAXSTACKTHREADSIZE << " CreateNewThread "
<< CreateNewThread() << " " << Automaton()->ActionName( _NextAction ) << "(" << Name() << ")"
<< endl;
CreateNewThread( true ) ;
myObjComponent = Component() ;
// cdebug << ThreadNo() << "Component known : NO StartComponent & Ping"
// << endl ;
- myObjComponent->ping() ;
+ try {
+ myObjComponent->ping() ;
+ }
+ catch( ... ) {
+ cdebug << "ping() catched" << endl ;
+ Err = true ;
+ }
}
int nOutParams = GetNodeOutPortsSize() ;
}
catch( ... ) {
cdebug << "DynInvoke setProperties catched ERROR" << endl ;
+ Err = true ;
}
}
- if ( IsComputingNode() ) {
+ if ( !Err && IsComputingNode() ) {
cdebug << ThreadNo() << " !ObjInterface " << Name()
<< " IsComputingNode DynInvoke" << endl ;
cdebug << ServiceInParameter().length()-1 << " input parameters and "
&InParametersList[1] , ServiceInParameter().length()-1 ,
&OutParametersList[0] , ServiceOutParameter().length() ) ;
}
- else if ( IsFactoryNode() ) {
+ else if ( !Err &&IsFactoryNode() ) {
cdebug << ThreadNo() << " !ObjInterface " << Name()
<< " IsFactoryNode DynInvoke" << endl ;
cdebug << ServiceInParameter().length() << " input parameters and "