I think it is more important to be consistent. If it is my intent to trigger a rollback, then I trap and log the exception and return ActionResult.Failure. Otherwise, I generally log and rethrow. Sometimes, I am only interested in setting or clearing a property. In that case, I trap everything and set the property appropriately.
-- John Merryweather Cooper Senior Software Engineer | Enterprise Service Applications | Continuing Development Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |jocoo...@jackhenry.com -----Original Message----- From: Nick Ramirez [mailto:nickra...@hotmail.com] Sent: Thursday, December 4, 2014 3:16 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Custom Action - Should I return ActionResult.Failure or thrown an exception? I was just thinking about this: What's the best practice for a custom action that has a problem? * Catch all exceptions and return ActionResult.Failure * Allow the exception to be thrown? Maybe ActionResult.Failure should be used for non-exception failed states? Such as the user entered something invalid into the UI? Although I guess you could throw an exception there too... -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Custom-Action-Should-I-return-ActionResult-Failure-or-thrown-an-exception-tp7598405.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users