folly: exception_tracer: add throw() to __cxa_begin_catch
authorLucian Grijincu <lucian@fb.com>
Mon, 1 Jun 2015 19:22:57 +0000 (12:22 -0700)
committerNoam Lerner <noamler@fb.com>
Wed, 3 Jun 2015 16:52:05 +0000 (09:52 -0700)
Summary:
http://libcxxabi.llvm.org/spec.html

void* __cxa_begin_catch(void* exceptionObject) throw();

```
folly/experimental/exception_tracer/ExceptionTracerLib.cpp:145:7: error: '__cxa_begin_catch' is missing exception specification 'throw()' [-Werror]
void* __cxa_begin_catch(void *excObj) {
^
throw()
folly/experimental/exception_tracer/ExceptionTracerLib.cpp:35:7: note: previous declaration is here
void* __cxa_begin_catch(void* excObj);
^
1 error generated.
11.44s error: folly/experimental/exception_tracer/ExceptionTracerLib.cpp
fbmake: *** [_build/opt/folly/experimental/exception_tracer/b187621/ExceptionTracerLib.o] Error 1
```

Test Plan: fbmake

Reviewed By: philipp@fb.com

Subscribers: folly-diffs@, yfeldblum, tudort, chalfant

FB internal diff: D2115305

Tasks: 5908365

Signature: t1:2115305:1433186210:3652d81ab10effe1be6da86705322ce090fb6cd4

Blame Revision: https://phabricator.fb.com/D2114085

folly/experimental/exception_tracer/ExceptionTracerLib.cpp

index ef358c04dbac718d12579dcc6f64c944f9e4239a..1eb303aa0fc05428245bdf1a762326deceff0fc0 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 FOLLY_NORETURN void __cxa_throw(void* thrownException,
                                 std::type_info* type,
                                 void (*destructor)(void*));
-void* __cxa_begin_catch(void* excObj);
+void* __cxa_begin_catch(void* excObj) throw();
 FOLLY_NORETURN void __cxa_rethrow(void);
 void __cxa_end_catch(void);
 }
@@ -142,7 +142,7 @@ void __cxa_rethrow() {
   orig_cxa_rethrow();
 }
 
-void* __cxa_begin_catch(void *excObj) {
+void* __cxa_begin_catch(void *excObj) throw() {
   // excObj is a pointer to the unwindHeader in __cxa_exception
   moveTopException(activeExceptions, caughtExceptions);
   return orig_cxa_begin_catch(excObj);