Bug 16740 - [ExternalTools] Irrelevant stack trace for errors in Ant build file
Summary: [ExternalTools] Irrelevant stack trace for errors in Ant build file
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-05-22 06:59 EDT by Aldo Eisma CLA
Modified: 2002-10-04 11:06 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aldo Eisma CLA 2002-05-22 06:59:32 EDT
When you make an error in an Ant build file (in this case xml that is not well-
formed) and a target in the Ant file is on a project's build spec, you get a 
useful message in the console (first line below), followed by a very long stack 
trace.
- The stack trace is irrelevant here (but could be written to log).
- Could also have an error for hello.xml line 4 in the Eclipse Task view.

===
D:\eclipse\workspace\Hello\hello.xml:4: The content of elements must consist of 
well-formed character data or markup.
	at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:135)
	at org.apache.tools.ant.ProjectHelper.configureProject
(ProjectHelper.java:85)

... etc etc etc
Comment 1 Simon Arsenault CLA 2002-05-29 10:38:38 EDT
Defer until after release 2.0
Comment 2 Simon Arsenault CLA 2002-07-12 11:15:16 EDT
Ant core is now passing along the original error message so we can display it 
in the error dialog instead of just "Build Failed" (see bug 21527).

Ant core is looking at not printing out the stack trace to the console, but 
instead to the log file (with maybe a message in the console that it was 
written there). Some exceptions trace are useful depending what when wrong.

No problem marker will be added to the task view. These type of markers cannot 
be deleted by the user, so we would need to manage these ourselves which is not 
possible if the ant build file reference by the tool is outside the workspace. 
We could just add a to do item to the task list, these can be deleted by the 
user. If you are interested in doing this work, please let me know (by opening 
a new bug report to explain the problem and the proposed solution). Right now, 
there are other higher priority items that we are working on.
Comment 3 Rodrigo Peretti CLA 2002-07-17 11:16:51 EDT
Since we already rethrow errors we do not need to print them. The code has 
been removed.
Comment 4 Rodrigo Peretti CLA 2002-07-17 11:42:25 EDT
I still think that some of the error dialogs provided by the UI should be more 
informative. For example, when a NoClassDefFoundError happens, the AntRunner 
throws a CoreException that wraps the original NoClassDefFoundError. The 
message in the CoreException tells the user to fix the Ant classpath but the 
original exception is hidden from the user (does not show in the dialog) and 
it usually contains important information like the name of the class that was 
not found. A details button showing information about the wrapped exception, 
IMO, is essential.
Comment 5 Darin Swanson CLA 2002-10-03 16:50:11 EDT
Clearing the later resolution
Comment 6 Darin Swanson CLA 2002-10-03 17:18:16 EDT
For classpath issues the name of the missing class is now displayed.
In general the nested exceptions (inside an InvocationTargetExcetpion etc) are 
now exposed and presented with the correct message in the error dialogs.
Comment 7 Darin Swanson CLA 2002-10-03 17:19:04 EDT
Please verify (Jared).
Comment 8 Jared Burns CLA 2002-10-04 11:06:06 EDT
Verified.