Add "EarlyJsError: " as prefix of early js error's message

Summary:
Changelog:
[General][Changed] - Add "EarlyJsError: " as prefix of early js error's message

Reviewed By: RSNara

Differential Revision: D40484148

fbshipit-source-id: 4c8f9b4a35c7547365bd70dff7627a08a0e6bc4b
This commit is contained in:
Lulu Wu
2022-10-20 03:22:25 -07:00
committed by Facebook GitHub Bot
parent e4b5d3eec9
commit be6f65660f
@@ -82,7 +82,7 @@ parseErrorStack(const jsi::JSError &error, bool isFatal, bool isHermes) {
}
}
errorObj.putMapBufferList(kAllStackFrames, std::move(frames));
errorObj.putString(kErrorMessage, error.getMessage());
errorObj.putString(kErrorMessage, "EarlyJsError: " + error.getMessage());
// TODO: If needed, can increment exceptionId by 1 each time
errorObj.putInt(kExceptionId, 0);
errorObj.putBool(kIsFatal, isFatal);