ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50181] New: Subclass BuildException with specific TimeoutException and ExecutedProgramFailedException exceptions
Date Fri, 29 Oct 2010 13:49:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50181

           Summary: Subclass BuildException with specific TimeoutException
                    and ExecutedProgramFailedException exceptions
           Product: Ant
           Version: nightly
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: stevel@apache.org


It is easier for callers of ant tasks to determine the cause of some specific
failures -namely test timeout and exec'd program failure by looking at the
exception type, rather than for specific strings.

In the ant codebase we look for build timeouts by searching for the string
"Timeout: killed the sub-process" in a Build Exception, and for executed
programs to return with a non-zero result by looking for the string "failed
with return code" in the BuildException test. This is bad style, and brittle.

This enhancement
 -adds specific subclasses to BuildException for these two events.
 -creates them at the right points in the code
   Timeout: ExecTask, Java, ParallelTask
   Execution failure: Execute
 -catches them in the code where needed
   Timeout: Java, the (effectively unreleased) funtest test runner
   Execution: Gcjh, kaffeh

The error strings are not changed, because of the risk that other code
embedding Ant is looking the same strings; keeps everything backwards
compatible.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message