I have a Schrodinger code .
I have this Xmlport to import data. If I catch the result, it's always False and the data obviously is not committed. If I don't catch it, it works fine, there is no error raised and the data is correctly registered:
Catching it:
tempBlob.CreateInStream(inStreamObj);
if Xmlport.Import(idXmlport, inStreamObj) then begin
// Never enters here!!!
exit(true);
end else begin
// Returns always False, nothing is imported.
exit(false);
end;
Without catching it:
tempBlob.CreateInStream(inStreamObj);
Xmlport.Import(codigoXmlport, inStreamObj); // <- This works fine!
exit(true);
I need to catch the result because it's an automatic queue, I don't want it to raise an unmanaged error to stop the process. But is sabotaging me.
I have tested and debugged the 2 codes, same function, same parameters, I don't use globals... and the outcome is different by only making the call inside the conditional.