~ResourceContainerTestSimulator()
{
- if (remoteResource != nullptr && remoteResource->isCaching())
+ try
{
- remoteResource->stopCaching();
+ if (remoteResource != nullptr && remoteResource->isCaching())
+ {
+ remoteResource->stopCaching();
+ }
+ if (remoteResource != nullptr && remoteResource->isMonitoring())
+ {
+ remoteResource->stopMonitoring();
+ }
}
- if (remoteResource != nullptr && remoteResource->isMonitoring())
+ catch (RCSException &e)
{
- remoteResource->stopMonitoring();
+ std::cout << "exception : " << e.what() << std::endl;
}
}
std::weak_ptr<ResourceContainerTestSimulator>(shared_from_this())));
mutexForDiscovery.lock();
}
- catch (std::exception &e)
+ catch (RCSInvalidParameterException &e)
{
std::cout << "exception : " << e.what() << std::endl;
}