add error catching

This commit is contained in:
1eG0ist 2024-11-17 00:56:50 +03:00
parent 78776706a7
commit 77051bcf84

View File

@ -28,7 +28,13 @@ namespace data.Repository
public IEnumerable<GroupDAO> getAllGroup()
{
return dbContext.groups.ToList();
try
{
return dbContext.groups.ToList();
}
catch (Exception ex) {
return new List<GroupDAO>();
}
}
}
}