Add error handling for new bootstrapper handler

This commit is contained in:
pizzaboxer 2023-02-11 19:21:20 +00:00
parent ff8e68abb2
commit d2557b4be5

View File

@ -181,7 +181,18 @@ namespace Bloxstrap
bootstrapper.Dialog = dialog;
}
Task bootstrapperTask = Task.Run(() => bootstrapper.Run());
Task bootstrapperTask = Task.Run(() => bootstrapper.Run()).ContinueWith(t =>
{
if (t.Exception is null)
return;
#if DEBUG
throw t.Exception;
#else
dialog?.ShowError(t.Exception.ToString());
#endif
});
dialog?.ShowBootstrapper();
bootstrapperTask.Wait();
}