fix shadowed variables
authorJames Sedgwick <jsedgwick@fb.com>
Thu, 8 Jan 2015 16:12:39 +0000 (08:12 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:05 +0000 (11:01 -0800)
Summary: as above, fixes builds

Test Plan: compiled thrift + mcrouter

Reviewed By: seanc@fb.com

Subscribers: seanc, fugalh, folly-diffs@

FB internal diff: D1771910

Signature: t1:1771910:1420733490:7f33e57a5853395cab786e5d35d4c15c75a15c5a

folly/wangle/futures/Future-inl.h
folly/wangle/futures/Promise-inl.h

index a980ff0302b36e410ed0a69f2d3560947a157a65..31cca9e51a3ad1f9a5ca39d4e8d94b22ce2b3315 100644 (file)
@@ -370,8 +370,8 @@ Future<T>::onError(F&& func) {
             f2.setCallback_([pm](Try<T>&& t2) mutable {
               pm->fulfilTry(std::move(t2));
             });
-          } catch (const std::exception& e) {
-            pm->setException(exception_wrapper(std::current_exception(), e));
+          } catch (const std::exception& e2) {
+            pm->setException(exception_wrapper(std::current_exception(), e2));
           } catch (...) {
             pm->setException(exception_wrapper(std::current_exception()));
           }
@@ -811,9 +811,9 @@ Future<T> Future<T>::within(Duration dur, E e, Timekeeper* tk) {
         try {
           t.throwIfFailed();
           ctx->promise.setException(std::move(ctx->exception));
-        } catch (std::exception const& e) {
+        } catch (std::exception const& e2) {
           ctx->promise.setException(
-              exception_wrapper(std::current_exception(), e));
+              exception_wrapper(std::current_exception(), e2));
         } catch (...) {
           ctx->promise.setException(
               exception_wrapper(std::current_exception()));
index d7ad250c52f987c22e3da5c09565f47494b86994..2ded4430a772dc0435db5f2d54d741d6ae3677de 100644 (file)
@@ -84,9 +84,9 @@ Promise<T>::setException(E const& e) {
 }
 
 template <class T>
-void Promise<T>::setException(std::exception_ptr const& e) {
+void Promise<T>::setException(std::exception_ptr const& ep) {
   try {
-    std::rethrow_exception(e);
+    std::rethrow_exception(ep);
   } catch (const std::exception& e) {
     setException(exception_wrapper(std::current_exception(), e));
   } catch (...) {