mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +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;
|
errorArgs.ErrorContext.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File.Exists(_saveService.FileNames.EphemeralConfigFile))
|
if (!File.Exists(_saveService.FileNames.EphemeralConfigFile))
|
||||||
try
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var text = File.ReadAllText(_saveService.FileNames.EphemeralConfigFile);
|
||||||
|
JsonConvert.PopulateObject(text, this, new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
var text = File.ReadAllText(_saveService.FileNames.EphemeralConfigFile);
|
Error = HandleDeserializationError,
|
||||||
JsonConvert.PopulateObject(text, this, new JsonSerializerSettings
|
});
|
||||||
{
|
}
|
||||||
Error = HandleDeserializationError,
|
catch (Exception ex)
|
||||||
});
|
{
|
||||||
}
|
Penumbra.Messager.NotificationMessage(ex,
|
||||||
catch (Exception ex)
|
"Error reading ephemeral Configuration, reverting to default.",
|
||||||
{
|
"Error reading ephemeral Configuration", NotificationType.Error);
|
||||||
Penumbra.Messager.NotificationMessage(ex,
|
}
|
||||||
"Error reading ephemeral Configuration, reverting to default.",
|
|
||||||
"Error reading ephemeral Configuration", NotificationType.Error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Save the current configuration. </summary>
|
/// <summary> Save the current configuration. </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue