Maintenance: Planio will be observing a scheduled maintenance window this Sunday, November 10, 2024 from 20:00 UTC until 21:00 UTC to perform important network maintenance in our primary data center. Your Planio account will be unavailable for a few minutes during this maintenance window.
Forums » Help »
Any reason why SaxonCS would output certain errors to the console although my code catches and handles the SaxonApiException?
Added by Martin Honnen over 1 year ago
I have a .NET 6 GUI application (using the AvaloniaUI framework) that uses SaxonCS for XSLT/XQuery/XPath processing. For some reasons I haven't understood some errors I get during XML parsing or XSLT or XQuery processing that are caught as a SaxonApiException by my code and displayed in the GUI are as well output to the console (as long as I run the code with dotnet ProgramName.dll from the console) e.g. there I see
Error in urn:from-string:
Error reported by XML parser processing urn:from-string
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Impl.Helpers.DotNetPullProvider.next()
: Root element is missing.
or
Error on line 13 column 6 of urn:from-string:
XTDE0560 There is no current template rule
at template xsl:initial-template on line 12 column 4 of urn:from-string
I am not able to reproduce that in a simple console application just doing the parsing or processing and catching the exception, there I only get my program's output to the console.
Sorry, I can't see any obvious cause. Would need to have a repro and debug it. It's not at all inconceivable that there's a rogue call that prints the stack trace of an exception before rethrowing it, but if there is, I can't find it.
Please register to reply