missing exception
authorElizabeth Smith <elizabeths@fb.com>
Tue, 13 May 2014 15:15:07 +0000 (08:15 -0700)
committerDave Watson <davejwatson@fb.com>
Tue, 20 May 2014 19:53:58 +0000 (12:53 -0700)
Summary: windows is also missing __throw_bad_alloc

Test Plan: fbconfig -r folly && fbmake runtests

Reviewed By: delong.j@fb.com

FB internal diff: D1318921

folly/detail/FunctionalExcept.cpp
folly/detail/FunctionalExcept.h

index f17879a79905657650e90e59fce480f5852d16a1..e78841a7f9767e1abb646301ac41006e52e5b8d6 100644 (file)
@@ -32,4 +32,10 @@ void __throw_out_of_range(const char* msg) {
   throw std::out_of_range(msg);
 }
 
+#if defined(_MSC_VER)
+void __throw_bad_alloc() {
+  throw std::bad_alloc();
+}
+#endif
+
 FOLLY_NAMESPACE_STD_END
index 1aaecebe323795b897bc4a1c9f5bdd71acdbd540..e328617ba22ba4da30dbf97263179e817684ff63 100644 (file)
@@ -25,6 +25,10 @@ FOLLY_NORETURN void __throw_length_error(const char* msg);
 FOLLY_NORETURN void __throw_logic_error(const char* msg);
 FOLLY_NORETURN void __throw_out_of_range(const char* msg);
 
+#ifdef _MSC_VER
+FOLLY_NORETURN void __throw_bad_alloc();
+#endif
+
 FOLLY_NAMESPACE_STD_END
 
 #endif