MCPcopy Create free account
hub / github.com/NativeScript/firebase / recordError

Method recordError

packages/firebase-crashlytics/index.ios.ts:65–76  ·  view source on GitHub ↗
(error: any)

Source from the content-addressed store, hash-verified

63 }
64
65 recordError(error: any): void {
66 if (error instanceof Error) {
67 StackTrace.fromError(error).then((stack) => {
68 const traceElements = stack.map((item) => FIRStackFrame.stackFrameWithSymbolFileLine(item.functionName || '(anonymous)', item.fileName ?? '', item.lineNumber ?? -1));
69 const e = FIRExceptionModel.exceptionModelWithNameReason(error.name || 'JavaScriptError', error.message);
70 e.stackTrace = NSArray.arrayWithArray(traceElements);
71 this.native.recordExceptionModel(e);
72 });
73 } else {
74 this.native.recordError(error);
75 }
76 }
77
78 sendUnsentReports(): void {
79 this.native.sendUnsentReports();

Callers

nothing calls this directly

Calls 2

recordErrorMethod · 0.65
thenMethod · 0.45

Tested by

no test coverage detected