We wrap the call to `_WriteSettings` in `CascadiaSettingsSerialization.cpp` in a try/catch block, and if we catch an error we append a warning telling the user to check the permissions on their settings file. Closes #7727
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
// Copyright (c) Microsoft Corporation
|
|
// Licensed under the MIT license.
|
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
|
{
|
|
// SettingsLoadWarnings are scenarios where the settings contained
|
|
// information we knew was invalid, but we could recover from.
|
|
enum SettingsLoadWarnings
|
|
{
|
|
MissingDefaultProfile = 0,
|
|
DuplicateProfile = 1,
|
|
UnknownColorScheme = 2,
|
|
InvalidBackgroundImage = 3,
|
|
InvalidIcon = 4,
|
|
AtLeastOneKeybindingWarning = 5,
|
|
TooManyKeysForChord = 6,
|
|
MissingRequiredParameter = 7,
|
|
LegacyGlobalsProperty = 8,
|
|
FailedToParseCommandJson = 9,
|
|
FailedToWriteToSettings = 10,
|
|
WARNINGS_SIZE // IMPORTANT: This MUST be the last value in this enum. It's an unused placeholder.
|
|
};
|
|
|
|
// SettingsLoadWarnings are scenarios where the settings had invalid state
|
|
// that we could not recover from.
|
|
enum SettingsLoadErrors
|
|
{
|
|
NoProfiles = 0,
|
|
AllProfilesHidden = 1,
|
|
ERRORS_SIZE // IMPORTANT: This MUST be the last value in this enum. It's an unused placeholder.
|
|
};
|
|
}
|