Home » U++ Library support » U++ Core » To get xml errors from LoadFromXML
To get xml errors from LoadFromXML [message #37806] |
Wed, 14 November 2012 09:18  |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
Now it is not possible to get errors in XML strings detected by LoadFromXML() because they are catched inside and removed.
I would vote to remove the try-catch from LoadFromXML() and let the programmer to handle the error properly.
bool LoadFromXML(Callback1<XmlIO> xmlize, const String& xml)
{
try {
XmlNode node = ParseXML(xml);
if(node.GetCount() == 0)
return false;
for(int i = 0; i < node.GetCount(); i++)
if(node.Node(i).IsTag()) {
Value dummy;
xmlize(XmlIO(node.At(i), true, dummy));
break;
}
return true;
}
catch(XmlError) {} // XmlError is removed
return false;
}
Best regards
IƱaki
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Apr 30 13:22:36 CEST 2025
Total time taken to generate the page: 0.04796 seconds
|