Skip to content

Commit 53eb470

Browse files
knightburtonyichoi
authored andcommitted
Error messages log
Print only the error messages into the debug console in case of error in the debugSession. IoT.js-VSCode-DCO-1.0-Signed-off-by: Imre Kiss [email protected]
1 parent 15296c9 commit 53eb470

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/IotjsDebugger.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class IotjsDebugSession extends DebugSession {
142142
this.sendResponse(response);
143143
})
144144
.catch(error => {
145-
this.log(error, LOG_LEVEL.ERROR);
145+
this.log(error.message, LOG_LEVEL.ERROR);
146146
this.sendErrorResponse(response, error);
147147
})
148148
.then(() => {
@@ -229,7 +229,7 @@ class IotjsDebugSession extends DebugSession {
229229
await this._protocolhandler.updateBreakpoint(jerryBreakpoint, true);
230230
return <TemporaryBreakpoint>{verified: true, line: breakpoint.line};
231231
} catch (error) {
232-
this.log(error, LOG_LEVEL.ERROR);
232+
this.log(error.message, LOG_LEVEL.ERROR);
233233
return <TemporaryBreakpoint>{verified: false, line: breakpoint.line, message: (<Error>error).message};
234234
}
235235
}));
@@ -251,7 +251,7 @@ class IotjsDebugSession extends DebugSession {
251251

252252
response.body = { breakpoints: [...persistingBreakpoints, ...newBreakpoints] };
253253
} catch (error) {
254-
this.log(error, LOG_LEVEL.ERROR);
254+
this.log(error.message, LOG_LEVEL.ERROR);
255255
this.sendErrorResponse(response, <Error>error);
256256
return;
257257
}
@@ -299,7 +299,7 @@ class IotjsDebugSession extends DebugSession {
299299

300300
this.sendResponse(response);
301301
} catch (error) {
302-
this.log(error);
302+
this.log(error.message, LOG_LEVEL.ERROR);
303303
this.sendErrorResponse(response, 0, (<Error>error).message);
304304
}
305305
}
@@ -315,7 +315,7 @@ class IotjsDebugSession extends DebugSession {
315315
this.sendResponse(response);
316316
})
317317
.catch(error => {
318-
this.log(error, LOG_LEVEL.ERROR);
318+
this.log(error.message, LOG_LEVEL.ERROR);
319319
this._sourceSendingOptions.state = SOURCE_SENDING_STATES.NOP;
320320
this.sendErrorResponse(response, <Error>error, ErrorDestination.User);
321321
});

0 commit comments

Comments
 (0)