summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-08-12 01:49:26 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-08-12 01:49:26 +0100
commit9fa8bbdb38c934569433b0836c73e36f5b254de7 (patch)
tree715bc19472053fa0daf406114c092302f7ae9ce6
parentWrite client logs to syslog instead of stderr (/dev/null) (diff)
downloadnetfs-9fa8bbdb38c934569433b0836c73e36f5b254de7.tar.bz2
netfs-9fa8bbdb38c934569433b0836c73e36f5b254de7.tar.xz
netfs-9fa8bbdb38c934569433b0836c73e36f5b254de7.zip
Improve error handling around ICE exceptions
-rw-r--r--netfs/fuse/fuseApp.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index 133860a..bc5caf0 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -180,7 +180,8 @@ NetFS::FuseApp::verifyConnection()
int
NetFS::FuseApp::onError(const std::exception & e) throw()
{
- if (dynamic_cast<const Ice::ObjectNotExistException *>(&e)) {
+ if (dynamic_cast<const Ice::SocketException *>(&e) || dynamic_cast<const Ice::TimeoutException *>(&e)) {
+ log(LOG_ERR, e.what());
verifyConnection();
connectSession();
connectToService();
@@ -188,6 +189,12 @@ NetFS::FuseApp::onError(const std::exception & e) throw()
connectHandles();
return 0;
}
+ if (dynamic_cast<const Ice::RequestFailedException *>(&e)) {
+ volume = NULL;
+ connectToVolume();
+ connectHandles();
+ return 0;
+ }
if (dynamic_cast<const NetFS::AuthError *>(&e)) {
return -EPERM;
}