give all folly exception types default visibility
[folly.git] / folly / fibers / AtomicBatchDispatcher.h
index 93f9c93b54baba4ceb3083b6b9328ab5a344f2a0..6dfddd2ae6786563e70fca1e451170991dfa1d01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 #pragma once
 
-#include <folly/Function.h>
-#include <folly/Optional.h>
-#include <folly/fibers/detail/AtomicBatchDispatcher.h>
-#include <folly/futures/Future.h>
-#include <folly/futures/Promise.h>
 #include <memory>
 #include <stdexcept>
 #include <string>
 #include <utility>
 #include <vector>
 
+#include <folly/CPortability.h>
+#include <folly/Function.h>
+#include <folly/Optional.h>
+#include <folly/fibers/detail/AtomicBatchDispatcher.h>
+#include <folly/futures/Future.h>
+#include <folly/futures/Promise.h>
+
 namespace folly {
 namespace fibers {
 
@@ -35,7 +37,7 @@ namespace fibers {
  * Examples are, multiple dispatch calls on the same token, trying to get more
  * tokens from the dispatcher after commit has been called, etc.
  */
-class ABDUsageException : public std::logic_error {
+class FOLLY_EXPORT ABDUsageException : public std::logic_error {
   using std::logic_error::logic_error;
 };
 
@@ -43,7 +45,7 @@ class ABDUsageException : public std::logic_error {
  * An exception class that gets set on the promise for dispatched tokens, when
  * the AtomicBatchDispatcher was destroyed before commit was called on it.
  */
-class ABDCommitNotCalledException : public std::runtime_error {
+class FOLLY_EXPORT ABDCommitNotCalledException : public std::runtime_error {
  public:
   ABDCommitNotCalledException()
       : std::runtime_error(
@@ -57,7 +59,7 @@ class ABDCommitNotCalledException : public std::runtime_error {
  * Only here so that the caller can distinguish the real failure cause
  * rather than these subsequently thrown exceptions.
  */
-class ABDTokenNotDispatchedException : public std::runtime_error {
+class FOLLY_EXPORT ABDTokenNotDispatchedException : public std::runtime_error {
   using std::runtime_error::runtime_error;
 };