Meyers singleton jsc error extractor

Reviewed By: mhorowitz

Differential Revision: D6554142

fbshipit-source-id: f586cd7030130e4ccb069f9aed8fb1364c527e54
This commit is contained in:
Max Sherman
2017-12-13 12:25:10 -08:00
committed by Facebook Github Bot
parent 2d4bedba0f
commit 434f432d5d
2 changed files with 1 additions and 10 deletions

View File

@@ -147,17 +147,8 @@ void JSException::buildMessage(JSContextRef ctx, JSValueRef exn, JSStringRef sou
namespace ExceptionHandling {
#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif
PlatformErrorExtractor platformErrorExtractor;
#if __clang__
#pragma clang diagnostic pop
#endif
}
JSObjectRef makeFunction(

View File

@@ -51,7 +51,7 @@ namespace ExceptionHandling {
// method@filename[:line[:column]]
std::string stack;
};
using PlatformErrorExtractor = std::function<ExtractedEror(const std::exception &ex, const char *context)>;
typedef ExtractedEror(*PlatformErrorExtractor)(const std::exception &ex, const char *context);
extern PlatformErrorExtractor platformErrorExtractor;
}