]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RadosStriperImpl.cc: catch exception by reference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 25 Jun 2014 14:50:20 +0000 (16:50 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 25 Jun 2014 15:04:18 +0000 (17:04 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/libradosstriper/RadosStriperImpl.cc

index 5d8e2f067c630af59449e89aa3bf95fe9ae65602..4ea04041f8574860db9927f1a42cf444ffae2795 100644 (file)
@@ -588,7 +588,7 @@ int libradosstriper::RadosStriperImpl::remove(const std::string& soid)
     }
     // return
     return rcr;
-  } catch (ErrorCode e) {
+  } catch (ErrorCode &e) {
     // errror caught when trying to take the exclusive lock
     return e.m_code;
   }
@@ -600,7 +600,7 @@ int libradosstriper::RadosStriperImpl::trunc(const std::string& soid, uint64_t s
   std::string firstObjOid = getObjectId(soid, 0);
   try {
     RadosExclusiveLock lock(&m_ioCtx, firstObjOid);
-  } catch (ErrorCode e) {
+  } catch (ErrorCode &e) {
     return e.m_code;
   }
   // load layout and size