You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/07/26 03:22:09 UTC

[Bug 2812] New: - Build Events dont get the Exception object set?

PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2812

*** shadow/2812	Wed Jul 25 18:22:09 2001
--- shadow/2812.tmp.9121	Wed Jul 25 18:22:09 2001
***************
*** 0 ****
--- 1,43 ----
+ +============================================================================+
+ | Build Events dont get the Exception object set?                            |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2812                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: Sun                     |
+ |     Severity: Blocker                  OS/Version: Other                   |
+ |     Priority: Other                     Component: Build Process           |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: SNeelakantan_C@zaplet.com                                    |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Hi Anties,
+ 
+ I wrote a class to capture build errors that a task/target might throw by
+ implementing the BuildListener interface. The way I tested it out was as 
+ follows:
+ 
+ <project default="A" >
+ <target name="A" >
+ <copy file="doesnotexist.txt" tofile="doesnotexist2.txt" />
+ <!-- both the above files do not exist -->
+ </target>
+ </project>
+ 
+ 
+ and wrote a class that implemented the BuildListener interface.
+ Even though the copy fails and I get the message
+ "Could not copy file doesnotexist.txt to doesnotexist2.txt" from Ant,
+ the BuildEvent object passed to the taskFinished() method [ implemented
+ in the BuildListener interface ] returns a null with getException()
+ ..Is this because a failed copy is _not_ an exception at all in Ant's mind
+ or a bug so that setException() is not called before calling taskFinished() on 
+ an error?
+ 
+ I hope I have made the problem clear.
+ If Ant is doing the "right" thing, let me know how I can accomplish 
+ this 'task' :-) ?
+ 
+ -Shankar