Replace usages of ErrorReporter with Logger
Summary: At the moment, in sonar we have an error reporter and a Logger. ErrorReporter can be encapsulated into Logger, so users don't have to decide between logging and reporting errors. Reviewed By: danielbuechele Differential Revision: D8531902 fbshipit-source-id: 3986f51ea163ac939f3baffd4db3ab968f2a0762
This commit is contained in:
committed by
Facebook Github Bot
parent
3d27dc2004
commit
54fa6aa8f2
@@ -171,11 +171,12 @@ export class Client extends EventEmitter {
|
||||
if (id == null) {
|
||||
const {error} = data;
|
||||
if (error != null) {
|
||||
this.app.logger.error(error.stacktrace || error.message, 'deviceError');
|
||||
this.app.errorReporter.report({
|
||||
message: error.message,
|
||||
stack: error.stacktrace,
|
||||
});
|
||||
this.app.logger.error(
|
||||
`Error received from device ${
|
||||
method ? `when calling ${method}` : ''
|
||||
}: ${error.message} + \nDevice Stack Trace: ${error.stacktrace}`,
|
||||
'deviceError',
|
||||
);
|
||||
} else if (method === 'refreshPlugins') {
|
||||
this.refreshPlugins();
|
||||
} else if (method === 'execute') {
|
||||
|
||||
Reference in New Issue
Block a user