mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
fix: restructure init task, needs some rewrites some time
This commit is contained in:
parent
ef3687f8d2
commit
b41bdfaee3
1 changed files with 15 additions and 3 deletions
|
|
@ -89,8 +89,14 @@ namespace Dalamud {
|
||||||
|
|
||||||
this.WinSock2 = new WinSockHandlers();
|
this.WinSock2 = new WinSockHandlers();
|
||||||
|
|
||||||
AssetManager.EnsureAssets(this.baseDirectory).ContinueWith(async task => {
|
Task.Run(async () => {
|
||||||
if (task.IsCanceled || task.IsFaulted) throw new Exception("Could not ensure assets.", task.Exception);
|
try {
|
||||||
|
await AssetManager.EnsureAssets(this.baseDirectory);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.Error(e, "Could not ensure assets.");
|
||||||
|
Unload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.LocalizationManager = new Localization(this.StartInfo.WorkingDirectory);
|
this.LocalizationManager = new Localization(this.StartInfo.WorkingDirectory);
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.LanguageOverride))
|
if (!string.IsNullOrEmpty(this.Configuration.LanguageOverride))
|
||||||
|
|
@ -119,7 +125,13 @@ namespace Dalamud {
|
||||||
}
|
}
|
||||||
|
|
||||||
Data = new DataManager(this.StartInfo.Language);
|
Data = new DataManager(this.StartInfo.Language);
|
||||||
await Data.Initialize(this.baseDirectory);
|
try {
|
||||||
|
await Data.Initialize(this.baseDirectory);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.Error(e, "Could not initialize DataManager.");
|
||||||
|
Unload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SeStringManager = new SeStringManager(Data);
|
SeStringManager = new SeStringManager(Data);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue