add error handling

This commit is contained in:
––AsTroLog 2023-11-22 18:07:05 +00:00
parent 31f94d32d0
commit 22d0311ec4

View File

@ -38,6 +38,7 @@ public partial class Chat : ComponentBase
private string name = "";
protected override async Task OnInitializedAsync()
{
try{
var input = _searchServise.firstMassage;
if (input!=null){
@ -71,6 +72,10 @@ public partial class Chat : ComponentBase
}else{
await LoadMessages();
}
}catch(Exception ex){
Console.WriteLine($"Error OnInitializedAsync: {ex.Message}");
}
}