aprovy / pococapsule

Automatically exported from code.google.com/p/pococapsule
0 stars 0 forks source link

pxgenproxy has misleading return code of 0 upon exception #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I run pxgenproxy (under Linux) and it has an exception (e.g. not
finding a file), its return code is 0, which means success, and is
incorrect.  This incorrect return value causes "make" to keep going, even
though the setup_reflx.cc file is empty.

What steps will reproduce the problem?
1. Install from pococapsule-cpp-1.0-Linux-x86-Install.  Set POCOCAPSULE_DIR
to the appropriate location.
2. cd $POCOCAPSULE_DIR/examples/basic-ioc/robotic-vehicle
3. mv robotic-application2poco.xsl robotic-application2poco.xsl_
   # (this step is just to cause the exception)
4. $POCOCAPSULE_DIR/bin/pxgenproxy -r=gather setup.xml
   # notice the exception
5. echo $?
   # shows value of 0

(You can also just run "make" at step 4 and watch it produce the exception
 and then continue past it.)

What is the expected output? What do you see instead?

I expect pxgenproxy to have a non-zero return code if it encounters
an exception -- especially an exception from parsing the setup.xml file!
This way, the make process can catch the error and stop.

Instead, I see pxgenproxy returning a return code of zero, which in
Linux means success.  Make interprets that as "everything is OK"
and continues on to compiling the (invalid) setup_reflx.cc file.

What version of the product are you using? On what operating system?

I guess version 1.0.  I installed via the binary installer
(pococapsule-cpp-1.0-Linux-x86-Install) under SUSE Linux Enterprise Server 10.

Please provide any additional information below.

I have successfully compiled all of the "basic-ioc" examples.  The above
steps are just to demonstrate the issue.  This problem occurs when I start
to modify things and try to apply it to my application.  If I get
"setup.xml" wrong or forget an .xsl file, pxgenproxy complains but make
doesn't notice the problem, which is very inconvenient while still trying
to figure out how to make everything work right.

Original issue reported on code.google.com by bra...@gmail.com on 22 Jan 2009 at 8:57

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. We will try to fix it in next minor release. 

Original comment by kjin...@gmail.com on 9 Feb 2009 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by kjin...@gmail.com on 4 Mar 2009 at 9:10

GoogleCodeExporter commented 9 years ago
Already fixed in 1.1

Original comment by kjin...@gmail.com on 17 Nov 2009 at 7:32