File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -243,10 +243,13 @@ export function stripUrlQueryAndFragment(urlPath: string): string {
243243 * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
244244 * in question), and marks it captured if not.
245245 *
246- * Sometimes an error gets captured by more than one mechanism. (This happens, for example, in frameworks where we
247- * intercept thrown errors, capture them, and then rethrow them so that the framework can handle them however it
248- * normally would, which may or may not lead to them being caught again by something like the global error handler.)
249- * This prevents us from actually recording it twice.
246+ * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
247+ * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
248+ * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
249+ * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
250+ * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
251+ * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
252+ * see it.
250253 *
251254 * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
252255 * them. {@link : Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
You can’t perform that action at this time.
0 commit comments