From 5adb7bd504505036d3f32c5afcc6e3a5835f2d4a Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 24 Oct 2018 00:39:10 +0200 Subject: Hand record upload error handling improved --- Aktywator/PBN.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Aktywator/PBN.cs') diff --git a/Aktywator/PBN.cs b/Aktywator/PBN.cs index e312d63..2e36aef 100644 --- a/Aktywator/PBN.cs +++ b/Aktywator/PBN.cs @@ -43,6 +43,10 @@ namespace Aktywator this._count++; } } + if (this._count == 0) + { + throw new Exception("PBN nie zawiera rozdań z zadanego przedziału"); + } if (pbn.Boards.Count > 0 && pbn.Boards[0].HasField("Event")) { this._title = pbn.Boards[0].GetField("Event"); -- cgit v1.2.3