Skip to content

Commit e8aed24

Browse files
committed
Improves softAssert function
1 parent ef64ed4 commit e8aed24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/base/common/assert.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ export function assert(condition: boolean): void {
3535
}
3636
}
3737

38+
/**
39+
* Like assert, but doesn't throw.
40+
*/
3841
export function softAssert(condition: boolean): void {
3942
if (!condition) {
40-
onUnexpectedError(new BugIndicatingError('Assertion Failed'));
43+
onUnexpectedError(new BugIndicatingError('Soft Assertion Failed'));
4144
}
4245
}
4346

0 commit comments

Comments
 (0)