Bug #6000
Updated by O'Neil Delpratt 5 months ago
Given the follow python script: ``` python proc = PySaxonProcessor(license=True) proc.set_configuration_property("http://saxon.sf.net/feature/licenseFileLocation", "/usr/lib/saxon-license.lic") xsltproc = proc.new_xslt30_processor() ``` If the license file is not fould using the set_configuration property it will crash It crashes as follows: ``` net.sf.saxon.trans.LicenseException: Failed to read license file /usr/lib/saxon-license.lic at com.saxonica.config.Verifier.loadLicense(Verifier.java:130) at com.saxonica.config.ProfessionalConfiguration.setConfigurationProperty(ProfessionalConfiguration.java:230) at net.sf.saxon.s9api.Processor.setConfigurationProperty(Processor.java:402) at net.sf.saxon.option.cpp.SaxonCAPI.applyToConfiguration(SaxonCAPI.java:569) ``` The problem is the @applyToConfiguration@ method in the class SaxonCAPI does not have graalvm exception handling annotation. We also need to add code in the C++ API to thrown the exception as a @SaxonApiException@