Log error instead of throwing. Move test to service.

This commit is contained in:
IllusionMH
2020-09-01 22:20:37 +03:00
parent 8d9eda5d0a
commit e73bf11849
3 changed files with 28 additions and 8 deletions
+6 -2
View File
@@ -73,8 +73,12 @@ export class OptionsService implements IOptionsService {
this.options = clone(DEFAULT_OPTIONS);
for (const k of Object.keys(options)) {
if (k in this.options) {
const newValue = options[k as keyof IPartialTerminalOptions] as any;
this.options[k] = this._sanitizeAndValidateOption(k, newValue);
try {
const newValue = options[k as keyof IPartialTerminalOptions] as any;
this.options[k] = this._sanitizeAndValidateOption(k, newValue);
} catch (e) {
console.error(e);
}
}
}
}