mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Full bugsnag
This commit is contained in:
@@ -124,6 +124,13 @@ export default class Coriolis extends React.Component {
|
|||||||
*/
|
*/
|
||||||
_onError(msg, scriptUrl, line, col, errObj) {
|
_onError(msg, scriptUrl, line, col, errObj) {
|
||||||
console && console.error && console.error(arguments); // eslint-disable-line no-console
|
console && console.error && console.error(arguments); // eslint-disable-line no-console
|
||||||
|
if (errObj) {
|
||||||
|
if (errObj instanceof Error) {
|
||||||
|
Bugsnag.notifyException(errObj) // eslint-disable-line
|
||||||
|
} else if (errObj instanceof String) {
|
||||||
|
Bugsnag.notify(msg, errObj) // eslint-disable-line
|
||||||
|
}
|
||||||
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
error: <ErrorDetails error={{ message: msg, details: { scriptUrl, line, col, error: JSON.stringify(errObj) } }}/>,
|
error: <ErrorDetails error={{ message: msg, details: { scriptUrl, line, col, error: JSON.stringify(errObj) } }}/>,
|
||||||
page: null,
|
page: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user