mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Add error handling for new bootstrapper handler
This commit is contained in:
parent
ff8e68abb2
commit
d2557b4be5
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user