The best principle is the principle of "least astonishment" - it is best to not dictate from on high.
If this is new API, allow for a RC parameter, which, if not specified, leads to an exception. If this is a new plug-in for an existing API, you are stuck with the previous results. On Tue, 27 Aug 2013 14:02:09 -0500 John McKown <[email protected]> wrote: :>Well, they might be able to do some sort of "back out". My main question is :>basically is it better to "throw an exception", which can be handled if :>appropriate, but not easily ignored. Or it is better to give a return code :>which _might_ be ignored due to poor programming practice, but is easier to :>"recover" from in order to perhaps "undo" something. :> :>But maybe it would be better to just do an ABEND instruction. I was :>thinking that "throwing an exception" might make it easier to encode what :>the problem actually is. :> :>I think, since the SQLITE routine just use a return code, and depend on the :>programmer taking responsibility, that my interface should likely continue :>to do the same. :> :> :>On Tue, Aug 27, 2013 at 1:16 PM, John Gilmore <[email protected]> wrote: :> :>> If you want to be punitive you can of course ABEND the offender. :>> :>> The notion of 'throwing an exception', raising a condition, is a much :>> better one, but only if it is substantive and not just formal; and it :>> is not obvious to me that you caller can recover from a :>> translation-time error at execution time. :>> :>> John Gilmore, Ashland, MA 01721 - USA :>> :>> ---------------------------------------------------------------------- :>> For IBM-MAIN subscribe / signoff / archive access instructions, :>> send email to [email protected] with the message: INFO IBM-MAIN :>> -- Binyamin Dissen <[email protected]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
