Remove template helper constants
[folly.git] / folly / futures / FutureException.h
index 7babb4b35b7aebaa113c291f051abd259fb04b49..2ee69c08bd388fec01ab10d6b44efced52f82c48 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,21 +39,29 @@ class NoState : public FutureException {
   NoState() : FutureException("No state") {}
 };
 
+[[noreturn]] void throwNoState();
+
 class PromiseAlreadySatisfied : public FutureException {
  public:
   PromiseAlreadySatisfied() : FutureException("Promise already satisfied") {}
 };
 
+[[noreturn]] void throwPromiseAlreadySatisfied();
+
 class FutureNotReady : public FutureException {
  public:
   FutureNotReady() : FutureException("Future not ready") {}
 };
 
+[[noreturn]] void throwFutureNotReady();
+
 class FutureAlreadyRetrieved : public FutureException {
  public:
   FutureAlreadyRetrieved() : FutureException("Future already retrieved") {}
 };
 
+[[noreturn]] void throwFutureAlreadyRetrieved();
+
 class FutureCancellation : public FutureException {
  public:
   FutureCancellation() : FutureException("Future was cancelled") {}
@@ -64,9 +72,18 @@ class TimedOut : public FutureException {
   TimedOut() : FutureException("Timed out") {}
 };
 
+[[noreturn]] void throwTimedOut();
+
 class PredicateDoesNotObtain : public FutureException {
  public:
   PredicateDoesNotObtain() : FutureException("Predicate does not obtain") {}
 };
 
+[[noreturn]] void throwPredicateDoesNotObtain();
+
+struct NoFutureInSplitter : FutureException {
+  NoFutureInSplitter() : FutureException("No Future in this FutureSplitter") {}
+};
+
+[[noreturn]] void throwNoFutureInSplitter();
 }