Only show the error when showUser is either not defined, or is true
fixes #128484
This commit is contained in:
parent
84a8a567e8
commit
29a85f4633
2 changed files with 7 additions and 2 deletions
|
@ -586,7 +586,10 @@ export class DebugService implements IDebugService {
|
|||
}
|
||||
|
||||
const errorMessage = error instanceof Error ? error.message : error;
|
||||
await this.showError(errorMessage, errors.isErrorWithActions(error) ? error.actions : []);
|
||||
if (error.showUser !== false) {
|
||||
// Only show the error when showUser is either not defined, or is true #128484
|
||||
await this.showError(errorMessage, errors.isErrorWithActions(error) ? error.actions : []);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -726,8 +726,10 @@ export class RawDebugSession implements IDisposable {
|
|||
if (error && error.format && error.showUser) {
|
||||
this.notificationService.error(userMessage);
|
||||
}
|
||||
const result = new Error(userMessage);
|
||||
(<any>result).showUser = error?.showUser;
|
||||
|
||||
return new Error(userMessage);
|
||||
return result;
|
||||
}
|
||||
|
||||
private mergeCapabilities(capabilities: DebugProtocol.Capabilities | undefined): void {
|
||||
|
|
Loading…
Reference in a new issue