Explorar o código

Stop if no data read

Piotr Czajkowski %!s(int64=3) %!d(string=hai) anos
pai
achega
dc9479a7bb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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();
         }