Improve compiler error display for latest Chromium
This commit addresses the issue of Chromium v126 and later not displaying error messages correctly when the error object's `message` property uses a getter. It refactors the code to utilize an immutable Error object with recursive context, improves error message formatting and leverages the `cause` property. Changes: - Refactor error wrapping internals to use an immutable error object, eliminating `message` getters. - Utilize the `cause` property in contextual errors for enhanced error display in the console. - Enhance message formatting with better indentation and listing. - Improve clarity by renaming values thrown during validations.
This commit is contained in:
@@ -28,7 +28,7 @@ describe('CategoryCollectionParser', () => {
|
||||
const data = new CollectionDataStub();
|
||||
const expectedAssertion: ObjectAssertion<CollectionData> = {
|
||||
value: data,
|
||||
valueName: 'collection',
|
||||
valueName: 'Collection',
|
||||
allowedProperties: [
|
||||
'os', 'scripting', 'actions', 'functions',
|
||||
],
|
||||
@@ -48,7 +48,7 @@ describe('CategoryCollectionParser', () => {
|
||||
const actions = [getCategoryStub('test1'), getCategoryStub('test2')];
|
||||
const expectedAssertion: NonEmptyCollectionAssertion = {
|
||||
value: actions,
|
||||
valueName: '"actions" in collection',
|
||||
valueName: '\'actions\' in collection',
|
||||
};
|
||||
const validator = new TypeValidatorStub();
|
||||
const context = new TestContext()
|
||||
|
||||
Reference in New Issue
Block a user