Don't fail on erros; expect the code to throw!

This commit is contained in:
RMidhunSuresh 2022-07-17 17:35:29 +05:30
parent f15e23762a
commit 80fb953688

View file

@ -64,11 +64,16 @@ export class ThemeLoader {
this._themeBuilder = new ThemeBuilder(this._platform, idToManifest, this.preferredColorScheme); this._themeBuilder = new ThemeBuilder(this._platform, idToManifest, this.preferredColorScheme);
for (let i = 0; i < results.length; ++i) { for (let i = 0; i < results.length; ++i) {
const { body } = results[i]; const { body } = results[i];
if (body.extends) { try {
await this._themeBuilder.populateDerivedTheme(body); if (body.extends) {
await this._themeBuilder.populateDerivedTheme(body);
}
else {
this._populateThemeMap(body, manifestLocations[i], log);
}
} }
else { catch(e) {
this._populateThemeMap(body, manifestLocations[i], log); console.error(e);
} }
} }
Object.assign(this._themeMapping, this._themeBuilder.themeMapping); Object.assign(this._themeMapping, this._themeBuilder.themeMapping);