From 0621ceabad9ed23409e4a8d965190580d926c077 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 28 Jan 2022 12:44:37 +0300 Subject: [PATCH] Throw Exception on null workbook --- src/PriceListTools/Source.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PriceListTools/Source.cs b/src/PriceListTools/Source.cs index fd64012..c3e2231 100644 --- a/src/PriceListTools/Source.cs +++ b/src/PriceListTools/Source.cs @@ -10,6 +10,11 @@ namespace RehauSku.PriceListTools public Source(Workbook workbook) { + if (workbook == null) + { + throw new ArgumentException($"Нет рабочего файла"); + } + Sheet = workbook.ActiveSheet; Name = workbook.Name;