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 @@ -242,10 +242,13 @@ export function stripUrlQueryAndFragment(urlPath: string): string {
242242 * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
243243 * in question), and marks it captured if not.
244244 *
245- * Sometimes an error gets captured by more than one mechanism. (This happens, for example, in frameworks where we
246- * intercept thrown errors, capture them, and then rethrow them so that the framework can handle them however it
247- * normally would, which may or may not lead to them being caught again by something like the global error handler.)
248- * This prevents us from actually recording it twice.
245+ * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
246+ * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
247+ * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
248+ * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
249+ * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
250+ * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
251+ * see it.
249252 *
250253 * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
251254 * 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