How do you catch rendering errors in RPE?
We are developing RPE scripts to produce well formed outputs for customer documents.
Several of the DNG users have put the images into artifacts in DNG that do not specify the item is an image. Also, we have images that will not render.
RPE crashes during document creation.
What I am tryign to do is to gracefully handle the error, put text into the generated document that states, the error but completes.
I am NOT using <div> without modifications because several users put hyper links to word definitions and the WORD output document needs to have these stripped out.
I am getting a 404 error for some images
Request URL: https://emsdoors/rm/embeddeddocuments/image?resourceRevisionURL=https://emsdoors/rm/resources/_e91cdbe232bf444c90b890079c6604c5&accept=&private=true
Reponse code: 404
CRRPE3294E Output: cannot download the image: https://emsdoors/rm/embeddeddocuments/image?resourceRevisionURL=https://emsdoors/rm/resources/_e91cdbe232bf444c90b890079c6604c5&accept=&private=true.
Form authentication required for https://emsdoors/rm/embeddeddocuments/image?resourceRevisionURL=https://emsdoors/rm/resources/_e91cdbe232bf444c90b890079c6604c5&accept=*&private=true but no credentials have been provided
Reponse message: OK
Request URL: https://emsdoors/jts/secure/authenticated/identity?redirectPath=%2Fjts%2Foauth-authorize%3Foauth_token%3D728da787e96144c789b80527d3c0d5e9
Reponse code: 200
And
2017-03-21 06:09:47,729 [ RRDG_187:19391-CORE] INFO com.ibm.rational.rrdg - CRRPE3018I The data source configuration module is reconfiguring data source text.2017-03-21 06:09:47,729 [ RRDG_187:19391-CORE] INFO com.ibm.rational.rrdg - CRRPE3107I Downloading data from https://emsdoors/rm/publish/text?resourceURI=_928fae32eef6486f87de4e4171cea11f&oslc_config.context=https://emsdoors/rm/cm/changeset/_99GWkP3YEeaRUZG5BdclbQ.
2017-03-21 06:09:47,791 [ RRDG_187:19393-OUTPUT] INFO com.ibm.rational.rrdg - [Error context] Template is https://emsdoors/rm/publish/templateLibrary/SDD_Multiple_Template_DNG
2017-03-21 06:09:47,791 [ RRDG_187:19393-OUTPUT] INFO com.ibm.rational.rrdg - [Error context] Template element is 89
2017-03-21 06:09:47,791 [ RRDG_187:19393-OUTPUT] INFO com.ibm.rational.rrdg - [Error context] Expression is used for CONTENT
2017-03-21 06:09:47,791 [ RRDG_187:19393-OUTPUT] ERROR com.ibm.rational.rrdg - CRRPE3095E Output processing could not continue due to an error.
javax.xml.stream.XMLStreamException: The element type "div" does not match the expected end-tag "</i>".
XHTML is <<div><i> </div>>
2017-03-21 06:09:49,650 [ RRDG_187:19391-CORE] INFO com.ibm.rational.rrdg - CRRPE3571I Finished reading input XML. 13 elements processed.
2017-03-21 06:09:49,650 [ RRDG_187:19391-CORE] ERROR com.ibm.rational.rrdg - CRRPE3012E IBM Rational Publishing Engine error.
Invalid output state.
2017-03-21 06:09:50,916 [ RRDG_187:19391-CORE] INFO com.ibm.rational.rrdg - CRRPE3603I Enable the Core Debug Mode for RPE to receive additional information on errors.for the other. The <div> error is from an attempt to render an image that is not specified as a wrapperResource.Summary:1. How to catch these so RPE will complete2. Will be to address the errors themselves.Thanks,
Comments
Kumaraswamy Gowda
Mar 21 '17, 8:09 p.m.Hi David,
Whichever template element is printing this data, you could use script expression tab with a try catch javascript (https://www.w3schools.com/jsref/jsref_try_catch.asp) to ignore any error or return some error text to be printed.
Regards,
Kumar
David Clark
Mar 21 '17, 8:22 p.m.Thanks Kumar, I tried putting try {} catch(err) - around any script code I have. I was wondering if there was anything else that can be used outside of the script window.