Add version number to error message
Summary: Minimal tweak to the soft crash error reporting: include the version number Reviewed By: passy Differential Revision: D26754416 fbshipit-source-id: d517d0bdb6bcf5c58b492c60b5bb8cc5f6b288f6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3d3724ac8b
commit
90ac5f55a2
@@ -49,6 +49,7 @@ import constants from './fb-stubs/constants';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {CopyOutlined} from '@ant-design/icons';
|
import {CopyOutlined} from '@ant-design/icons';
|
||||||
import {clipboard} from 'electron/common';
|
import {clipboard} from 'electron/common';
|
||||||
|
import {getVersionString} from './utils/versionString';
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') {
|
if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') {
|
||||||
// By default Node.JS has its internal certificate storage and doesn't use
|
// By default Node.JS has its internal certificate storage and doesn't use
|
||||||
@@ -73,7 +74,11 @@ class AppFrame extends React.Component<
|
|||||||
|
|
||||||
getError() {
|
getError() {
|
||||||
return this.state.error
|
return this.state.error
|
||||||
? `${this.state.error}\n\nComponent stack:\n${this.state.errorInfo?.componentStack}\n\nError stacktrace:\n${this.state.error?.stack}`
|
? `${
|
||||||
|
this.state.error
|
||||||
|
}\n\nFlipper version: ${getVersionString()}\n\nComponent stack:\n${
|
||||||
|
this.state.errorInfo?.componentStack
|
||||||
|
}\n\nError stacktrace:\n${this.state.error?.stack}`
|
||||||
: '';
|
: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user