We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a50209c + c67a82d commit 7813e46Copy full SHA for 7813e46
1 file changed
src/vs/workbench/api/common/extHostTypes.ts
@@ -885,6 +885,12 @@ export class Diagnostic {
885
tags?: DiagnosticTag[];
886
887
constructor(range: Range, message: string, severity: DiagnosticSeverity = DiagnosticSeverity.Error) {
888
+ if (!Range.isRange(range)) {
889
+ throw new TypeError('range must be set');
890
+ }
891
+ if (!message) {
892
+ throw new TypeError('message must be set');
893
894
this.range = range;
895
this.message = message;
896
this.severity = severity;
0 commit comments