[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Errors don't affect apache 'fop.bat' exit code?
From: |
Greg Chicares |
Subject: |
[lmi] Errors don't affect apache 'fop.bat' exit code? |
Date: |
Tue, 26 Jun 2007 12:51:27 +0000 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
I'm testing how the GUI displays diagnostics, in particular when
apache 'fop.bat' is invoked. Some problems seem to be ignored:
the exit code of 'fop.bat' is zero, so the command "succeeds",
and the lmi GUI deliberately shows no output in that case, even
when 'fop' writes apparently-severe diagnostics to stdout.
It used to be easy to induce a nonzero exit code when we were
letting 'fop.bat' invoke 'xalan', simply by mangling an '.xsl'
file. It's still easy to get an xslt error, but since we do the
transformation with 'libxslt' now, it's trapped before 'fop' is
invoked. Instead, I'm trying to force an fo error, in order to
make sure the GUI displays it; but my experiments have been
unsuccessful. Now I'm wondering whether 'fop.bat' can ever
actually return a nonzero exit code with '-fo' input.
For example, I tried to induce an error by mangling a stylesheet
this way:
- <fo:block text-align="left">
+ <fo:blick text-align="left">
<xsl:call-template name="company-logo"/>
- </fo:block>
+ </fo:blick>
That's acceptable to xslt, but it's not good fo; yet I saw no
diagnostics in the GUI, because the exit code is zero.
I ran an 'fop.bat' command in an interactive shell in order to
see all the output unconditionally--copied and pasted below.
The exit code is zero (that's what "[0]" in my prompt indicates)
despite the "[ERROR]". All output, even the "[ERROR]" line, goes
to stdout; nothing is written to stderr. A pdf file is produced.
I suppose the behavior is in effect the same as it was a month
ago: then, all this output would fly by on a console that quickly
vanished; now, it's not shown at all (because the command
"succeeded"). Then, as now, an exit code of zero means that lmi
proceeds as though nothing bad had happened. If I understand
that correctly, then this isn't a regression error; but it's not
nearly ideal.
[Strange quoting on the command line is accidental, but I think
it doesn't matter to 'CMD'.]
C:/tmp[0]$ CMD /c /fop-0.20.5/fop -fo /var/opt/lmi/spool/"sample.000000000.fo.x
ml" "/var/opt/lmi/spool/sample.000000000.pdf2"
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[ERROR] Unsupported element encountered: blick (Namespace: http://www.w3.org/199
9/XSL/Format). Source context: file:/C:/var/opt/lmi/spool/sample.000000000.fo.xm
l (line: 66, col: 35)
[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.) or el
ements from another supported language.
[INFO] [1]
[INFO] [2]
[INFO] [3]
[WARNING] Some static content could not fit in the area.
[INFO] [4]
[INFO] [5]
[INFO] [6]
[INFO] [7]
[INFO] [8]
[INFO] [9]
[INFO] Parsing of document complete, stopping renderer
C:/tmp[0]$
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] Errors don't affect apache 'fop.bat' exit code?,
Greg Chicares <=