On Thu, Sep 10, 2009 at 11:24 AM, Matthew Brand
<[email protected]> wrote:
> :: (adverse) catches errors but not throws. Is there a way to catch a
> throw in a tacit expression?

Conceptually speaking, a throw requires an explicit expression:
you can not generate throws without using an explicit expression
to generate it.

Similarly, you can write your own "adverse" style conjunction
which evaluates a verb and if it generates a throw evaluates
some other verb.  The implementation of this conjunction
would be explicit, but if you are already dealing with a throw
that should not be an obstacle for you.

In other words something like this (but I have not tested it):

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


  throwAnException adverse ('caught you!"_) ''

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to