Make the V8_UNIMPLEMENTED error include the function name (#13559)

Co-authored-by: 190n <ben@bun.sh>
This commit is contained in:
Jarred Sumner
2024-08-30 18:52:08 -07:00
committed by GitHub
parent 2f19b71e0f
commit 6555248a04

View File

@@ -8,7 +8,15 @@
#define BUN_EXPORT JS_EXPORT
#endif
#define V8_UNIMPLEMENTED() BUN_PANIC("You're using a module which calls a V8 function that Bun does not yet implement. Track progress at https://github.com/oven-sh/bun/issues/4290.")
#define V8_UNIMPLEMENTED() \
do { \
const auto str = WTF::makeString( \
"You're using a module which calls a V8 function \""_s, \
WTF::ASCIILiteral::fromLiteralUnsafe(__PRETTY_FUNCTION__), \
"\" that Bun does not yet implement. Track progress at https://github.com/oven-sh/bun/issues/4290."_s); \
auto utf8 = str.utf8(); \
Bun__panic(utf8.data(), utf8.length()); \
} while (0)
extern "C" Zig::GlobalObject* Bun__getDefaultGlobalObject();