Add exception handling to products display
This commit is contained in:
parent
15b6a66d98
commit
845af854bd
@ -83,6 +83,8 @@ namespace LibationWinForms.GridView
|
||||
#region UI display functions
|
||||
|
||||
public void Display()
|
||||
{
|
||||
try
|
||||
{
|
||||
// don't return early if lib size == 0. this will not update correctly if all books are removed
|
||||
var lib = DbContexts.GetLibrary_Flat_NoTracking();
|
||||
@ -96,6 +98,11 @@ namespace LibationWinForms.GridView
|
||||
}
|
||||
else
|
||||
productsGrid.UpdateGrid(lib);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Serilog.Log.Error(ex, "Error displaying library in {0}", nameof(ProductsDisplay));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user