Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Truncate and Terminate PT compilation
System
The presentation templates here have a lot of embedded Perl that reads config files, etc. These things can encounter error conditions in which case I need to be able to give the user an error message (that can also be trapped in workflow to prevent deployment). I can't put all of the Perl at the top of the presentation template - I need to be able to generate the error message after some of the HTML in the PT has already been processed.
Is there some way to truncate the stream of data that would be written to the output file being generated so I can just output the error message and not the content that has already been processed in the PT and DCR? And how do I terminate processing of the PT after I have encountered the first error?
Find more posts tagged with
Comments
Johnny
I guess you could play with the stream buffer commands (__TS_SERVER__/iw/help/tst/pt/TeamSite__PT__iw_perl.html) to flush out what is in there and insert your own.
I dont know how much that can help in terms of changing the flow if a fatal error is encountered. I have had to build templates similar to this in the past and did put all the logic first before any output is generated. Then used print statements to STDERR and the exit command to clean up.
If you cant put the logic before any output then you might need to put logic around your output to check to see if it is ok to continue.
John Cuiuli