Browse Source

[trac613] use the rethrow idiom instead of explicitly resending the same exception object.

JINMEI Tatuya 14 years ago
parent
commit
33deff727f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/bin/auth/config.cc
  2. 1 1
      src/bin/resolver/resolver.cc

+ 1 - 1
src/bin/auth/config.cc

@@ -271,7 +271,7 @@ configureAuthServer(AuthSrv& server, ConstElementPtr config_set) {
             parsers.push_back(parser);
         }
     } catch (const AuthConfigError& ex) {
-        throw ex;                  // simply rethrowing it
+        throw;                  // simply rethrowing it
     } catch (const isc::Exception& ex) {
         isc_throw(AuthConfigError, "Server configuration failed: " <<
                   ex.what());

+ 1 - 1
src/bin/resolver/resolver.cc

@@ -643,7 +643,7 @@ Resolver::setListenAddresses(const vector<addr_t>& addresses) {
             dlog(string("Rollback failed with: ") + e2.what(),true);
             abort();
         }
-        throw e; // Let it fly a little bit further
+        throw; // Let it fly a little bit further
     }
 }