Ver Fonte

Stop if no data read

Piotr Czajkowski há 3 anos atrás
pai
commit
dc9479a7bb
1 ficheiros alterados com 3 adições e 0 exclusões
  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();
         }