@internal
(origin: string, willCrashApp: boolean | 'unknown')
| 1680 | |
| 1681 | /** @internal */ |
| 1682 | createErrorAnnotations(origin: string, willCrashApp: boolean | 'unknown') { |
| 1683 | try { |
| 1684 | const editingShapeId = this.getEditingShapeId() |
| 1685 | return { |
| 1686 | tags: { |
| 1687 | origin: origin, |
| 1688 | willCrashApp, |
| 1689 | }, |
| 1690 | extras: { |
| 1691 | activeStateNode: this.root.getPath(), |
| 1692 | selectedShapes: this.getSelectedShapes().map((s) => { |
| 1693 | const { props, ...rest } = s |
| 1694 | const { text: _text, richText: _richText, ...restProps } = props as any |
| 1695 | return { |
| 1696 | ...rest, |
| 1697 | props: restProps, |
| 1698 | } |
| 1699 | }), |
| 1700 | selectionCount: this.getSelectedShapes().length, |
| 1701 | editingShape: editingShapeId ? this.getShape(editingShapeId) : undefined, |
| 1702 | inputs: this.inputs.toJson(), |
| 1703 | pageState: this.getCurrentPageState(), |
| 1704 | instanceState: this.getInstanceState(), |
| 1705 | collaboratorCount: this.getCollaboratorsOnCurrentPage().length, |
| 1706 | }, |
| 1707 | } |
| 1708 | } catch { |
| 1709 | return { |
| 1710 | tags: { |
| 1711 | origin: origin, |
| 1712 | willCrashApp, |
| 1713 | }, |
| 1714 | extras: {}, |
| 1715 | } |
| 1716 | } |
| 1717 | } |
| 1718 | |
| 1719 | /** @internal */ |
| 1720 | private _crashingError: unknown | null = null |
no test coverage detected