Skip to content

Commit

Permalink
WebFreak001#282: Ensure we send error response for threads request
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Fleck <mfleck@eclipsesource.com>
  • Loading branch information
martin-fleck-at committed Jul 29, 2021
1 parent 897f97f commit 8244cfb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mibase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ export class MI2DebugSession extends DebugSession {
this.sendResponse(response);
return;
}
this.miDebugger.getThreads().then(
threads => {
this.miDebugger.getThreads().then(threads => {
response.body = {
threads: []
};
Expand All @@ -278,6 +277,8 @@ export class MI2DebugSession extends DebugSession {
response.body.threads.push(new Thread(thread.id, thread.id + ":" + threadName));
}
this.sendResponse(response);
}).catch(error => {
this.sendErrorResponse(response, 17, `Could not get threads: ${error}`);
});
}

Expand Down

0 comments on commit 8244cfb

Please sign in to comment.