If debug is on, and you are in a try block then either:

(a) the try block has a catchd., or
(b) you turned debug on in the try block (using 13!:0]1, for example)

And, yes, if the code hits an error, and debug is on, it will suspend there.

Also, if the code hits a stop line, and debug is on, it will suspend there.

If a line has both a stop and an error, then resuming execution of
that line will toggle back and forth between reporting the stop and
reporting the error (unless you remedy the error or remove the stop or
disable debugging -- if you disable debugging, that would clear the
stack).

Does this answer your question?

Thanks,

-- 
Raul

On Wed, Jan 12, 2022 at 3:03 PM Don Guinn <[email protected]> wrote:
>
> I hadn't but I have now. And I'm confused.
>
> It seems that if debug is on that I am in debugging mode and even if an
> error occurs within a try. block that it should suspend on the line in
> error and not attempt any other recovery. I'm trying to debug something. Is
> that what you meant about maybe the setting should on the try. instead on
> the catchd. ? Maybe a tryd. ?
>
> I apologize for being dense. Is there an example of using the catchd. to
> allow me to debug from the line in error? Or an example using it?
>
> On Wed, Jan 12, 2022 at 12:20 PM Raul Miller <[email protected]> wrote:
>
> > Have you read the https://code.jsoftware.com/wiki/Vocabulary/trydot
> > which Henry updated an hour or so ago?
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > On Wed, Jan 12, 2022 at 2:18 PM Don Guinn <[email protected]> wrote:
> > >
> > > I changed the catch. to catchd. and it still caught the error. Debug was
> > > still on. Help implied that the catchd. block would not run at all if
> > debug
> > > were on before the try./catch. block. Since one can test to see if debug
> > > was set in catch. , what is the purpose for catchd. ? What am I missing?
> > >
> > > What I would really like is to put the try./catch. in the highest level
> > of
> > > an application and it catch any error in the application. It seems
> > awkward
> > > to have to put try./catch. in every subroutine to handle errors.
> > >
> > > >
> > > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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