UNPKG

1.54 kBTypeScriptView Raw
1import { Event, EventHint, Exception, Severity, StackFrame } from '@sentry/types';
2/**
3 * This function creates an exception from an TraceKitStackTrace
4 * @param stacktrace TraceKitStackTrace that will be converted to an exception
5 * @hidden
6 */
7export declare function exceptionFromError(ex: Error): Exception;
8/**
9 * @hidden
10 */
11export declare function eventFromPlainObject(exception: Record<string, unknown>, syntheticException?: Error, isUnhandledRejection?: boolean): Event;
12/**
13 * @hidden
14 */
15export declare function eventFromError(ex: Error): Event;
16/** Parses stack frames from an error */
17export declare function parseStackFrames(ex: Error & {
18 framesToPop?: number;
19 stacktrace?: string;
20}): StackFrame[];
21/**
22 * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
23 * @hidden
24 */
25export declare function eventFromException(exception: unknown, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
26/**
27 * Builds and Event from a Message
28 * @hidden
29 */
30export declare function eventFromMessage(message: string, level?: Severity, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
31/**
32 * @hidden
33 */
34export declare function eventFromUnknownInput(exception: unknown, syntheticException?: Error, attachStacktrace?: boolean, isUnhandledRejection?: boolean): Event;
35/**
36 * @hidden
37 */
38export declare function eventFromString(input: string, syntheticException?: Error, attachStacktrace?: boolean): Event;
39//# sourceMappingURL=eventbuilder.d.ts.map
\No newline at end of file