ChakraCore
ChakraCore copied to clipboard
Script Meta Data in Native Function
I am porting an old application that embedded a very old version of Mozilla js to use chakra.
This application involves several native objects written in C. The methods of these objects will be invoked from the script. If there is an exception to be raised from the native method, is there a way to determine meta data (source, url, line, column) about the script function from where the native function was called?
JsGetAndClearExceptionWithMetadata should be able to help: https://github.com/chakra-core/ChakraCore/wiki/JsGetAndClearExceptionWithMetadata
It returns a JavaScript object containing the source information.
Let me know if this helps.