Report failures on snapshot taking

Summary: Suggested in D21571294.

Reviewed By: jknoxville

Differential Revision: D21594146

fbshipit-source-id: 1dcc310343788aecced724282d74e0cf08688220
This commit is contained in:
Pascal Hartig
2020-05-15 07:08:06 -07:00
committed by Facebook GitHub Bot
parent 2495442243
commit a65b6025c1

View File

@@ -73,7 +73,9 @@ class ScreenCaptureButtons extends Component<Props, State> {
captureScreenshot: Promise<void> | any = async () => {
const {selectedDevice} = this.props;
if (selectedDevice != null) {
await capture(selectedDevice).then(openFile);
await capture(selectedDevice)
.then(openFile)
.catch((e) => console.error('Taking screenshot failed:', e));
}
};