folly/futures/test/NonCopyableLambdaTest.cpp: avoid shadowing warnings
[folly.git] / folly / futures / FutureException.h
index c5dbf1584820a7e8fb4db8095a3b7b12ff49c049..8e10746ae19d00c16d5e8f8763211b4ecaa4b821 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -48,8 +48,9 @@ public:
 
 class BrokenPromise : public FutureException {
   public:
-    explicit BrokenPromise() :
-      FutureException("Broken promise") { }
+    explicit BrokenPromise(std::string type) :
+      FutureException(
+          (std::string("Broken promise for type name `") + type) + '`') { }
 };
 
 class NoState : public FutureException {
@@ -75,12 +76,6 @@ class FutureAlreadyRetrieved : public FutureException {
       FutureException("Future already retrieved") { }
 };
 
-class UsingUninitializedTry : public FutureException {
-  public:
-    explicit UsingUninitializedTry() :
-      FutureException("Using unitialized try") { }
-};
-
 class FutureCancellation : public FutureException {
  public:
   FutureCancellation() : FutureException("Future was cancelled") {}
@@ -91,11 +86,6 @@ class TimedOut : public FutureException {
   TimedOut() : FutureException("Timed out") {}
 };
 
-class CancelTimer : public FutureException {
- public:
-  CancelTimer() : FutureException("Timer should be cancelled") {}
-};
-
 class PredicateDoesNotObtain : public FutureException {
  public:
   PredicateDoesNotObtain() : FutureException("Predicate does not obtain") {}