From d313654b774db064a056d963d9b7b5c55c1a821b Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Thu, 28 Dec 2023 04:23:58 -0800 Subject: [PATCH] [Upstreamed] Unhandled promise rejection - attach non-standard Error object stack info if possible (#42079) Summary: This is a continuation of my [last PR](https://github.com/facebook/react-native/pull/40914) which improved the symbolication of unhandled promise rejections. While I was developing another library I noticed I still got an error stack of the log adding and not of the error itself. The library I'm trying to debug does not throw a standard error object but rather a custom one, but it still contains the stack field. By passing this stack field to the logbox call I was able to get a better symbolicated stack trace. The exact line of the failure is not displayed but at least the correct file is.