Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/RootErrorBoundary.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow strict-local */
import React from 'react';
import { View, Clipboard, TextInput, ScrollView, Button, Platform } from 'react-native';
import { View, Text, Clipboard, TextInput, ScrollView, Button, Platform } from 'react-native';
import Toast from 'react-native-simple-toast';

import * as logging from './utils/logging';
Expand All @@ -27,7 +27,8 @@ type State = $ReadOnly<{|
* from this component itself. It doesn't depend on any external setup
* except Sentry's initialization (without which we'd have no hope of
* reporting the error to Sentry), e.g., from other React components
* in the tree.
* in the tree. N.B., this means things like proper safe-area
* handling, light-dark theming, and translation won't work.
*
* [1] https://reactjs.org/docs/error-boundaries.html#how-about-event-handlers
*/
Expand Down Expand Up @@ -91,8 +92,9 @@ ${error.stack}`;
padding: 50,
}}
>
<Text>Ouch, there was an error.</Text>
<Button
title="Ouch, there's been an error. Tap to copy the stack trace below."
title="Copy details"
// If something in `onPress` fails, we shouldn't get a
// white screen [1]: "Unlike the render method and
// lifecycle methods, the event handlers don’t happen
Expand Down