mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +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();
|
||||
|
||||
AssetManager.EnsureAssets(this.baseDirectory).ContinueWith(async task => {
|
||||
if (task.IsCanceled || task.IsFaulted) throw new Exception("Could not ensure assets.", task.Exception);
|
||||
Task.Run(async () => {
|
||||
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);
|
||||
if (!string.IsNullOrEmpty(this.Configuration.LanguageOverride))
|
||||
|
|
@ -119,7 +125,13 @@ namespace Dalamud {
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue