Browse Source

Stop if no data read

Piotr Czajkowski 3 năm trước cách đây
mục cha
commit
dc9479a7bb
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      PSDText/PSDText.cs

+ 3 - 0
PSDText/PSDText.cs

@@ -84,6 +84,9 @@ namespace PSDText
                 throw new FileNotFoundException($"File {path} doesn't exist!");
 
             _xmlData = Readxmpmeta(path);
+            if (string.IsNullOrWhiteSpace(_xmlData))
+                throw new Exception("No data was read!");
+
             AddXMLNamespaces();
             TextData = GetTextData();
         }