Modify

Ticket #334 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

Run a task on BuildException

Reported by: anonymous Owned by: hans
Priority: minor Milestone: TBD
Component: phing-core Version: 2.3.2
Keywords: Cc:

Description

It would be helpful to be able to execute a task if a BuildException occurs. For example, suppose a build script creates a temp directory to hold an SVN export. If the SVN export tasks fails, it would be good to be able to delete the temp directory.

Something similar to try catch block in the XML would be great, i.e.

<target name="code_export">
    <mkdir dir="..." />
    <try>
        <svnexport todir="..." />
        <catch type="BuildException">
            <!-- a specific exception -->           
        </catch>
        <catch>
            <!-- any other exception -->
            <delete dir="..." />
        </catch>
    </try>
</target>

I have read the documentation but cannot find anything related to this, so apologies if there is already something that will do the job.

Attachments

Change History

comment:1 Changed 3 years ago by mrook

  • Priority changed from major to minor
  • Milestone set to 3.0
View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.