I finally settled on the three conjunctions below.

NB. not strictly useful, same as ::
onErrorDo=:2 :0
 try. u y catch. v y end.
:
 try. x u y catch. x v y end.
)

onExceptionDo=:2 :0
 try. u y catcht. v y end.
:
 try. x u y catcht. x v y end.
)

onErrorOrExceptionDo=:2 :0
 try. u y catcht. v y catch. v y end.
:
 try. x u y catcht. x v y catch. x v y end.
)



2009/9/10 Tracy Harms <[email protected]>:
> Sorry I posted in haste; wish I'd thought it through. Thank you for
> the correction.
>
> On Thu, Sep 10, 2009 at 9:05 AM, Raul Miller <[email protected]> wrote:
>> On Thu, Sep 10, 2009 at 11:53 AM, Tracy Harms <[email protected]> wrote:
>>> The evaluation of u occurs outside the scope of try. so the value
>>> error is not caught:
>>
>> No.
>>
>> Value errors are not throws.
>>
>> Here's the definition Matthew had provided:
>>
>> throwAnException =: 3 : 0
>>  throw.
>> )
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to