Skip to content

Commit a021f59

Browse files
committed
TraceServer: Also show error detail when available
Fixes #8. (Finishes doing so.) Signed-off-by: Marco Miller <marco.miller@ericsson.com>
1 parent 73b96b3 commit a021f59

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/trace-server.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class TraceServer {
5656
const message = prefix + ' stopping' + suffix + ' Resetting.';
5757
treeKill(pid, error => {
5858
if (error) {
59-
this.showError(message);
59+
this.showErrorDetailed(message, error);
6060
} else {
6161
id = setTimeout(() => this.showError(message), millis);
6262
}
@@ -182,6 +182,13 @@ export class TraceServer {
182182
this.setStatusIfAvailable(up);
183183
}
184184

185+
private showErrorDetailed(message: string, error: Error) {
186+
const details = error.name + ' - ' + error.message;
187+
vscode.window.showErrorMessage(details);
188+
console.error(details);
189+
this.showError(message);
190+
}
191+
185192
private showStatus(started: boolean) {
186193
if (started) {
187194
vscode.window.showInformationMessage(prefix + ': Started.');

0 commit comments

Comments
 (0)