Quellcode durchsuchen

* Patch from Sergei Gorelkin: * Makes TDOMParser.ParseURI throw EXMLReadError when URI is not resolvable (consistent with the Parse method).

git-svn-id: trunk@11389 -
michael vor 17 Jahren
Ursprung
Commit
42601356dd
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      packages/fcl-xml/src/xmlread.pp

+ 3 - 1
packages/fcl-xml/src/xmlread.pp

@@ -637,7 +637,9 @@ begin
   with TXMLReader.Create(Self) do
   with TXMLReader.Create(Self) do
   try
   try
     if ResolveEntity(URI, '', Src) then
     if ResolveEntity(URI, '', Src) then
-      ProcessXML(Src);
+      ProcessXML(Src)
+    else
+      DoErrorPos(esFatal, 'The specified URI could not be resolved', NullLocation);
   finally
   finally
     ADoc := TXMLDocument(doc);
     ADoc := TXMLDocument(doc);
     Free;
     Free;