Improve errors around screen capture
Summary: Tasks like T143443148 pop up frequently and are inactionable. This is usually due to device flakiness, storage being full, incompatibility or configuration problems. Start and stop were also copy-pasted to make matters worse. Reviewed By: ivanmisuno Differential Revision: D42800489 fbshipit-source-id: 11caaa4133e4fa1d773364a6ba4e5f5bb0d2f2ce
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9540ea579c
commit
7d58037ad6
@@ -45,7 +45,7 @@ export default function ScreenCaptureButtons() {
|
||||
setIsRecording(true);
|
||||
const videoPath = path.join(getCaptureLocation(), getFileName('mp4'));
|
||||
return selectedDevice.startScreenCapture(videoPath).catch((e) => {
|
||||
console.error('Failed to start recording', e);
|
||||
console.warn('Failed to start recording', e);
|
||||
message.error('Failed to start recording' + e);
|
||||
setIsRecording(false);
|
||||
});
|
||||
@@ -58,8 +58,8 @@ export default function ScreenCaptureButtons() {
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Failed to start recording', e);
|
||||
message.error('Failed to start recording' + e);
|
||||
console.warn('Failed to stop recording', e);
|
||||
message.error('Failed to stop recording' + e);
|
||||
})
|
||||
.finally(() => {
|
||||
setIsRecording(false);
|
||||
|
||||
Reference in New Issue
Block a user