Commit 79922302 authored by Savorboard's avatar Savorboard

add exception log if storage structure failed. #337

parent 4c870f42
......@@ -35,7 +35,14 @@ namespace DotNetCore.CAP
{
_logger.LogDebug("### CAP background task is starting.");
await Storage.InitializeAsync(stoppingToken);
try
{
await Storage.InitializeAsync(stoppingToken);
}
catch (Exception e)
{
_logger.LogError(e, "Initializing the storage structure failed!");
}
stoppingToken.Register(() =>
{
......@@ -53,11 +60,11 @@ namespace DotNetCore.CAP
}
}
});
await BootstrapCoreAsync();
_logger.LogInformation("### CAP started!");
}
}
protected virtual Task BootstrapCoreAsync()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment