Explorar el Código

Stop if no data read

Piotr Czajkowski hace 3 años
padre
commit
dc9479a7bb
Se han modificado 1 ficheros con 3 adiciones y 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();
         }