mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Morp.
This commit is contained in:
parent
908239bf13
commit
69c493b9d6
1 changed files with 16 additions and 14 deletions
|
|
@ -52,21 +52,23 @@ public class EphemeralConfig : ISavable
|
|||
errorArgs.ErrorContext.Handled = true;
|
||||
}
|
||||
|
||||
if (File.Exists(_saveService.FileNames.EphemeralConfigFile))
|
||||
try
|
||||
if (!File.Exists(_saveService.FileNames.EphemeralConfigFile))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var text = File.ReadAllText(_saveService.FileNames.EphemeralConfigFile);
|
||||
JsonConvert.PopulateObject(text, this, new JsonSerializerSettings
|
||||
{
|
||||
var text = File.ReadAllText(_saveService.FileNames.EphemeralConfigFile);
|
||||
JsonConvert.PopulateObject(text, this, new JsonSerializerSettings
|
||||
{
|
||||
Error = HandleDeserializationError,
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Penumbra.Messager.NotificationMessage(ex,
|
||||
"Error reading ephemeral Configuration, reverting to default.",
|
||||
"Error reading ephemeral Configuration", NotificationType.Error);
|
||||
}
|
||||
Error = HandleDeserializationError,
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Penumbra.Messager.NotificationMessage(ex,
|
||||
"Error reading ephemeral Configuration, reverting to default.",
|
||||
"Error reading ephemeral Configuration", NotificationType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Save the current configuration. </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue