But the program already exits with an explicit error of 1. Any other ideas?
Gilbert Rebhan <[EMAIL PROTECTED] e> To Ant Users List 15/07/2008 21:07 <user@ant.apache.org> Mail Size: 5140 cc Please respond to Subject "Ant Users List" Re: failonerror and forking <[EMAIL PROTECTED] Entity org> Investment Banking Europe - IBEU Gilbert Rebhan schrieb: > [EMAIL PROTECTED] schrieb: >> Hello everybody, >> >> I am running a forked <java> task as part of my ant job using the >> following >> <java classname="path.to.class" fork="true" failonerror="true" >> dir="${config}"> arguments. When I run the job, ant ends with "BUILD >> SUCCESSFULL" even if there was an exception raised in the forked task. >> But >> I would need the job to end with an error code. Has anybody ever come >> across this problem? > try with explicitly System.exit(some int != 0), f.e. > > ... > try { > foobar() > } catch (Exception exc { > System.exit(1) > } > ... replace with = use an explicit System.exit(some int != 0) in your class, f.e. ... try { foobar() } catch (Exception exc { System.exit(1) } ... Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised and regulated by the Financial Services Authority. ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]