import { type Attachment } from '@sentry/core'; import { type EventContextAndTags, type EventExtraContext, type EventTags, type ThrottleOverride } from './event-context.js'; import { extraEventAttachmentsSymbol, extraEventContextSymbol, extraEventTagsSymbol, extraEventThrottleSymbol } from './extra-event-context.js'; /** * Constructs an error with extra event context attached to it in the same way that * throwWithExtraContext attaches data. * * The following examples are equivalent: * * @example Throw new ExtraContextError('my error', {context: {stuff: 'hi'}}); * * @example Const myError = new Error('my error'); throwWithExtraContext(myError, {context: {stuff: * 'hi'}}); */ export declare class ExtraContextError extends Error { readonly name = "ExtraContextError"; readonly [extraEventContextSymbol]: EventExtraContext | undefined; readonly [extraEventTagsSymbol]: EventTags | undefined; readonly [extraEventAttachmentsSymbol]: ReadonlyArray | undefined; readonly [extraEventThrottleSymbol]: ThrottleOverride | undefined; constructor(message: string, extraData: EventContextAndTags); } /** * Adds extra context to an error without modifying the error's message or stack trace (or any of * its other properties), then throws the error so it can propagate as usual. */ export declare function throwWithExtraContext(originalError: unknown, extraData: EventContextAndTags): never;