Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken


devel / comp.lang.mumps / Re: Error-Handling in YottaDB

SubjectAuthor
* Error-Handling in YottaDBJens
`* Re: Error-Handling in YottaDBK.S. Bhaskar
 `* Re: Error-Handling in YottaDBJens
  `* Re: Error-Handling in YottaDBK.S. Bhaskar
   `* Re: Error-Handling in YottaDBJens
    `* Re: Error-Handling in YottaDBK.S. Bhaskar
     `* Re: Error-Handling in YottaDBJens
      `* Re: Error-Handling in YottaDBSam Habiel
       `- Re: Error-Handling in YottaDBJens

1
Error-Handling in YottaDB

<2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=565&group=comp.lang.mumps#565

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ad4:55e7:0:b0:656:2f02:1565 with SMTP id bu7-20020ad455e7000000b006562f021565mr196630qvb.2.1696845913940;
Mon, 09 Oct 2023 03:05:13 -0700 (PDT)
X-Received: by 2002:a9d:6b0e:0:b0:6bc:ac3d:2b77 with SMTP id
g14-20020a9d6b0e000000b006bcac3d2b77mr4530682otp.2.1696845913718; Mon, 09 Oct
2023 03:05:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 9 Oct 2023 03:05:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e71d:3800:c4c:813a:7f77:f2b;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e71d:3800:c4c:813a:7f77:f2b
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
Subject: Error-Handling in YottaDB
From: jewu34@web.de (Jens)
Injection-Date: Mon, 09 Oct 2023 10:05:13 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1178
 by: Jens - Mon, 9 Oct 2023 10:05 UTC

TEST3 ;
S $ZT="D HDL"
;
W 1/0
Q
HDL ;
W "Error handled here.",!
Q

Why does a STACKCRIT-Error appear hear after the output of some "Error handled here" texts?

Re: Error-Handling in YottaDB

<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=566&group=comp.lang.mumps#566

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ad4:5a4f:0:b0:64f:3e89:5060 with SMTP id ej15-20020ad45a4f000000b0064f3e895060mr231264qvb.1.1696862447222;
Mon, 09 Oct 2023 07:40:47 -0700 (PDT)
X-Received: by 2002:a05:6808:218c:b0:3a3:d677:9a8d with SMTP id
be12-20020a056808218c00b003a3d6779a8dmr8174271oib.0.1696862446743; Mon, 09
Oct 2023 07:40:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 9 Oct 2023 07:40:46 -0700 (PDT)
In-Reply-To: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.162.243.192; posting-account=zTPg1AoAAABx_LtAQ3dW6FBnU1dwmSvl
NNTP-Posting-Host: 71.162.243.192
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: ksbhaskar@gmail.com (K.S. Bhaskar)
Injection-Date: Mon, 09 Oct 2023 14:40:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2039
 by: K.S. Bhaskar - Mon, 9 Oct 2023 14:40 UTC

On Monday, October 9, 2023 at 6:05:14 AM UTC-4, Jens wrote:
> TEST3 ;
> S $ZT="D HDL"
> ;
> W 1/0
> Q
> HDL ;
> W "Error handled here.",!
> Q
>
> Why does a STACKCRIT-Error appear hear after the output of some "Error handled here" texts?

Use $ETRAP and clear $ECODE before returning.

$ yottadb -run %XCMD 'zp ^TEST3 d ^TEST3'
TEST3 ;
S $ET="D HDL"
;
W 1/0
Q
HDL ;
W "Error handled here.",!
S $ECODE=""
Q
Error handled here.
$

If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.

Regards
– Bhaskar

Re: Error-Handling in YottaDB

<bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=567&group=comp.lang.mumps#567

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ad4:59d1:0:b0:66c:ffa8:a52b with SMTP id el17-20020ad459d1000000b0066cffa8a52bmr72517qvb.6.1697039236541;
Wed, 11 Oct 2023 08:47:16 -0700 (PDT)
X-Received: by 2002:a05:6870:5a86:b0:1e9:9e04:9544 with SMTP id
dt6-20020a0568705a8600b001e99e049544mr352755oab.0.1697039236272; Wed, 11 Oct
2023 08:47:16 -0700 (PDT)
Path: i2pn2.org!rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 11 Oct 2023 08:47:15 -0700 (PDT)
In-Reply-To: <09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e71d:3800:4d00:43c2:c73c:ede8;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e71d:3800:4d00:43c2:c73c:ede8
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com> <09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: jewu34@web.de (Jens)
Injection-Date: Wed, 11 Oct 2023 15:47:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2158
 by: Jens - Wed, 11 Oct 2023 15:47 UTC

K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
>
> Regards
> – Bhaskar

Hi Bhaskar,

thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.

TEST3 ;
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q

Re: Error-Handling in YottaDB

<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=568&group=comp.lang.mumps#568

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a0c:d641:0:b0:66c:fef0:ce80 with SMTP id e1-20020a0cd641000000b0066cfef0ce80mr50321qvj.4.1697735993124;
Thu, 19 Oct 2023 10:19:53 -0700 (PDT)
X-Received: by 2002:a05:6808:1986:b0:3ae:61f:335e with SMTP id
bj6-20020a056808198600b003ae061f335emr985546oib.5.1697735992712; Thu, 19 Oct
2023 10:19:52 -0700 (PDT)
Path: i2pn2.org!rocksolid2!news.neodome.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 19 Oct 2023 10:19:52 -0700 (PDT)
In-Reply-To: <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.162.243.192; posting-account=zTPg1AoAAABx_LtAQ3dW6FBnU1dwmSvl
NNTP-Posting-Host: 71.162.243.192
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: ksbhaskar@gmail.com (K.S. Bhaskar)
Injection-Date: Thu, 19 Oct 2023 17:19:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3533
 by: K.S. Bhaskar - Thu, 19 Oct 2023 17:19 UTC

On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> >
> > Regards
> > – Bhaskar
> Hi Bhaskar,
>
> thank you for your instant reply.
> I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
>
> TEST3 ;
> S y=0
> S $ZT="D HDL"
> W 1/0
> Q
> HDL ;
> S y=y+1
> W "Error handled here.",!
> I y=10 ZSHOW "S" B
> Q

I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.

$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3

YDB>h
$

As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap

“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”

Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:

$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$

Regards
– Bhaskar

Re: Error-Handling in YottaDB

<a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=569&group=comp.lang.mumps#569

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:540b:0:b0:417:b53c:5d4c with SMTP id b11-20020ac8540b000000b00417b53c5d4cmr105071qtq.1.1697892038077;
Sat, 21 Oct 2023 05:40:38 -0700 (PDT)
X-Received: by 2002:a05:6870:a117:b0:1e9:a727:e1f with SMTP id
m23-20020a056870a11700b001e9a7270e1fmr2118519oae.8.1697892037608; Sat, 21 Oct
2023 05:40:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Sat, 21 Oct 2023 05:40:37 -0700 (PDT)
In-Reply-To: <b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e71d:3800:6121:bd34:be92:759f;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e71d:3800:6121:bd34:be92:759f
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: jewu34@web.de (Jens)
Injection-Date: Sat, 21 Oct 2023 12:40:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4103
 by: Jens - Sat, 21 Oct 2023 12:40 UTC

K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
> On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> > K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> > >
> > > Regards
> > > – Bhaskar
> > Hi Bhaskar,
> >
> > thank you for your instant reply.
> > I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> > But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
> >
> > TEST3 ;
> > S y=0
> > S $ZT="D HDL"
> > W 1/0
> > Q
> > HDL ;
> > S y=y+1
> > W "Error handled here.",!
> > I y=10 ZSHOW "S" B
> > Q
> I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
>
> $ yottadb -run TEST3
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> Error handled here.
> HDL+3^TEST3
> TEST3+3^TEST3 ($ZTRAP)
> %YDB-I-BREAK, Break instruction encountered
> At M source location HDL+3^TEST3
>
> YDB>h
> $
>
> As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
>
> “If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
>
> Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
>
> $ yottadb -run %XCMD 'zprint ^TEST3A'
> TEST3A ;
> S y=0
> S $ET="D HDL"
> W 1/0
> Q
> HDL ;
> S y=y+1
> W "Error handled here.",!
> I y=10 ZSHOW "S" B
> Q
> $ yottadb -run TEST3A
> Error handled here.
> $
>
> Regards
> – Bhaskar

Maybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.

Re: Error-Handling in YottaDB

<9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=570&group=comp.lang.mumps#570

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:6204:0:b0:419:cb89:f4e2 with SMTP id ks4-20020ac86204000000b00419cb89f4e2mr184831qtb.3.1697938849114;
Sat, 21 Oct 2023 18:40:49 -0700 (PDT)
X-Received: by 2002:a05:6808:21aa:b0:3ad:f6ad:b9cc with SMTP id
be42-20020a05680821aa00b003adf6adb9ccmr2511871oib.10.1697938848744; Sat, 21
Oct 2023 18:40:48 -0700 (PDT)
Path: i2pn2.org!rocksolid2!news.neodome.net!news.ortolo.eu!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Sat, 21 Oct 2023 18:40:48 -0700 (PDT)
In-Reply-To: <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.36.235.25; posting-account=zTPg1AoAAABx_LtAQ3dW6FBnU1dwmSvl
NNTP-Posting-Host: 108.36.235.25
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com> <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: ksbhaskar@gmail.com (K.S. Bhaskar)
Injection-Date: Sun, 22 Oct 2023 01:40:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: K.S. Bhaskar - Sun, 22 Oct 2023 01:40 UTC

On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
> K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
> > On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> > > K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > > > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> > > >
> > > > Regards
> > > > – Bhaskar
> > > Hi Bhaskar,
> > >
> > > thank you for your instant reply.
> > > I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> > > But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
> > >
> > > TEST3 ;
> > > S y=0
> > > S $ZT="D HDL"
> > > W 1/0
> > > Q
> > > HDL ;
> > > S y=y+1
> > > W "Error handled here.",!
> > > I y=10 ZSHOW "S" B
> > > Q
> > I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
> >
> > $ yottadb -run TEST3
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > HDL+3^TEST3
> > TEST3+3^TEST3 ($ZTRAP)
> > %YDB-I-BREAK, Break instruction encountered
> > At M source location HDL+3^TEST3
> >
> > YDB>h
> > $
> >
> > As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
> >
> > “If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
> >
> > Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
> >
> > $ yottadb -run %XCMD 'zprint ^TEST3A'
> > TEST3A ;
> > S y=0
> > S $ET="D HDL"
> > W 1/0
> > Q
> > HDL ;
> > S y=y+1
> > W "Error handled here.",!
> > I y=10 ZSHOW "S" B
> > Q
> > $ yottadb -run TEST3A
> > Error handled here.
> > $
> >
> > Regards
> > – Bhaskar
> Maybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.

There is no stack buildup. After the Q in HDL, control returns to the W 1/0..

Regards
– Bhaskar

Re: Error-Handling in YottaDB

<b75713ac-44b1-4522-a3c8-6b65f0e4aa63n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=571&group=comp.lang.mumps#571

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:44cb:0:b0:40f:e0dd:8050 with SMTP id b11-20020ac844cb000000b0040fe0dd8050mr151314qto.5.1697966192533;
Sun, 22 Oct 2023 02:16:32 -0700 (PDT)
X-Received: by 2002:a05:6871:740d:b0:1d6:3c76:e1c9 with SMTP id
nw13-20020a056871740d00b001d63c76e1c9mr3238297oac.6.1697966192309; Sun, 22
Oct 2023 02:16:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Sun, 22 Oct 2023 02:16:31 -0700 (PDT)
In-Reply-To: <9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e71d:3800:3cc3:f5f5:636:cf27;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e71d:3800:3cc3:f5f5:636:cf27
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com> <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
<9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b75713ac-44b1-4522-a3c8-6b65f0e4aa63n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: jewu34@web.de (Jens)
Injection-Date: Sun, 22 Oct 2023 09:16:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4992
 by: Jens - Sun, 22 Oct 2023 09:16 UTC

K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:
> On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
> > K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
> > > On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> > > > K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > > > > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> > > > >
> > > > > Regards
> > > > > – Bhaskar
> > > > Hi Bhaskar,
> > > >
> > > > thank you for your instant reply.
> > > > I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> > > > But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
> > > >
> > > > TEST3 ;
> > > > S y=0
> > > > S $ZT="D HDL"
> > > > W 1/0
> > > > Q
> > > > HDL ;
> > > > S y=y+1
> > > > W "Error handled here.",!
> > > > I y=10 ZSHOW "S" B
> > > > Q
> > > I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
> > >
> > > $ yottadb -run TEST3
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > HDL+3^TEST3
> > > TEST3+3^TEST3 ($ZTRAP)
> > > %YDB-I-BREAK, Break instruction encountered
> > > At M source location HDL+3^TEST3
> > >
> > > YDB>h
> > > $
> > >
> > > As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
> > >
> > > “If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
> > >
> > > Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
> > >
> > > $ yottadb -run %XCMD 'zprint ^TEST3A'
> > > TEST3A ;
> > > S y=0
> > > S $ET="D HDL"
> > > W 1/0
> > > Q
> > > HDL ;
> > > S y=y+1
> > > W "Error handled here.",!
> > > I y=10 ZSHOW "S" B
> > > Q
> > > $ yottadb -run TEST3A
> > > Error handled here.
> > > $
> > >
> > > Regards
> > > – Bhaskar
> > Maybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
> There is no stack buildup. After the Q in HDL, control returns to the W 1/0.
>
This is what I thought, what the routine would do, but the output of the routine I posted first ends with:

....
Error handled here.
Error handled here.
Error handled here.
Error handled here.
%YDB-E-STACKCRIT, Stack space critical

Re: Error-Handling in YottaDB

<5d8ec146-b08c-4caa-86b5-559817b78374n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=572&group=comp.lang.mumps#572

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:564a:0:b0:410:9ecd:3c82 with SMTP id 10-20020ac8564a000000b004109ecd3c82mr214628qtt.5.1698095346352;
Mon, 23 Oct 2023 14:09:06 -0700 (PDT)
X-Received: by 2002:a05:6870:f205:b0:1ea:2dd6:6a86 with SMTP id
t5-20020a056870f20500b001ea2dd66a86mr5199602oao.9.1698095346028; Mon, 23 Oct
2023 14:09:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 23 Oct 2023 14:09:05 -0700 (PDT)
In-Reply-To: <bcba90ed-b908-4f49-a19e-457e2368d525n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.162.243.192; posting-account=1RT8nQoAAAAj9lvLkm8f9L-U6g6gYLit
NNTP-Posting-Host: 71.162.243.192
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com> <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
<9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com> <b75713ac-44b1-4522-a3c8-6b65f0e4aa63n@googlegroups.com>
<bcba90ed-b908-4f49-a19e-457e2368d525n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d8ec146-b08c-4caa-86b5-559817b78374n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: sam.habiel@gmail.com (Sam Habiel)
Injection-Date: Mon, 23 Oct 2023 21:09:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6162
 by: Sam Habiel - Mon, 23 Oct 2023 21:09 UTC

On Monday, October 23, 2023 at 11:14:10 AM UTC-4, Sam Habiel wrote:
> On Sunday, October 22, 2023 at 5:16:33 AM UTC-4, Jens wrote:
> > K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:
> > > On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
> > > > K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
> > > > > On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> > > > > > K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > > > > > > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems.. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> > > > > > >
> > > > > > > Regards
> > > > > > > – Bhaskar
> > > > > > Hi Bhaskar,
> > > > > >
> > > > > > thank you for your instant reply.
> > > > > > I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> > > > > > But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
> > > > > >
> > > > > > TEST3 ;
> > > > > > S y=0
> > > > > > S $ZT="D HDL"
> > > > > > W 1/0
> > > > > > Q
> > > > > > HDL ;
> > > > > > S y=y+1
> > > > > > W "Error handled here.",!
> > > > > > I y=10 ZSHOW "S" B
> > > > > > Q
> > > > > I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
> > > > >
> > > > > $ yottadb -run TEST3
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > Error handled here.
> > > > > HDL+3^TEST3
> > > > > TEST3+3^TEST3 ($ZTRAP)
> > > > > %YDB-I-BREAK, Break instruction encountered
> > > > > At M source location HDL+3^TEST3
> > > > >
> > > > > YDB>h
> > > > > $
> > > > >
> > > > > As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc..html#differences-between-etrap-and-ztrap
> > > > >
> > > > > “If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
> > > > >
> > > > > Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
> > > > >
> > > > > $ yottadb -run %XCMD 'zprint ^TEST3A'
> > > > > TEST3A ;
> > > > > S y=0
> > > > > S $ET="D HDL"
> > > > > W 1/0
> > > > > Q
> > > > > HDL ;
> > > > > S y=y+1
> > > > > W "Error handled here.",!
> > > > > I y=10 ZSHOW "S" B
> > > > > Q
> > > > > $ yottadb -run TEST3A
> > > > > Error handled here.
> > > > > $
> > > > >
> > > > > Regards
> > > > > – Bhaskar
> > > > Maybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
> > > There is no stack buildup. After the Q in HDL, control returns to the W 1/0.
> > >
> > This is what I thought, what the routine would do, but the output of the routine I posted first ends with:
> >
> > ...
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > Error handled here.
> > %YDB-E-STACKCRIT, Stack space critical
> Jens,
>
> I took a quick look:
>
> I think you are right that there may be an issue with YottaDB. We looked quickly at the code and it is adding something to the internal stack without taking it off every time $ZTRAP is invoked. I created this issue: https://gitlab.com/YottaDB/DB/YDB/-/issues/1037
>
> --Sam

Jens,

Your issue has been fixed in the master branch. It was indeed a bug as you suspected.

--Sam

Re: Error-Handling in YottaDB

<903e82c7-cd5f-4e0b-8cbb-5d92427b3721n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=573&group=comp.lang.mumps#573

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:6889:0:b0:419:57b9:e90 with SMTP id m9-20020ac86889000000b0041957b90e90mr232403qtq.9.1698228835955;
Wed, 25 Oct 2023 03:13:55 -0700 (PDT)
X-Received: by 2002:a05:6830:4873:b0:6b8:6f61:5f61 with SMTP id
dx19-20020a056830487300b006b86f615f61mr3872489otb.6.1698228835619; Wed, 25
Oct 2023 03:13:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 25 Oct 2023 03:13:55 -0700 (PDT)
In-Reply-To: <5d8ec146-b08c-4caa-86b5-559817b78374n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e71d:3800:1019:89a7:df5:4b77;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e71d:3800:1019:89a7:df5:4b77
References: <2eb1240f-302c-4c03-8eab-b19c5a5fcf0cn@googlegroups.com>
<09d49958-b315-4549-ac3b-d815826377b8n@googlegroups.com> <bb5631a0-5850-43bf-a339-821d5e93e7d1n@googlegroups.com>
<b6d087d5-7129-42f3-a6c3-f932c1e88f31n@googlegroups.com> <a3bcca53-d5f6-461b-8f47-a3578d695de9n@googlegroups.com>
<9ec1216d-a088-4506-8069-0bcacc8f40dan@googlegroups.com> <b75713ac-44b1-4522-a3c8-6b65f0e4aa63n@googlegroups.com>
<bcba90ed-b908-4f49-a19e-457e2368d525n@googlegroups.com> <5d8ec146-b08c-4caa-86b5-559817b78374n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <903e82c7-cd5f-4e0b-8cbb-5d92427b3721n@googlegroups.com>
Subject: Re: Error-Handling in YottaDB
From: jewu34@web.de (Jens)
Injection-Date: Wed, 25 Oct 2023 10:13:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 126
 by: Jens - Wed, 25 Oct 2023 10:13 UTC

Sam Habiel schrieb am Montag, 23. Oktober 2023 um 23:09:07 UTC+2:
> On Monday, October 23, 2023 at 11:14:10 AM UTC-4, Sam Habiel wrote:
> > On Sunday, October 22, 2023 at 5:16:33 AM UTC-4, Jens wrote:
> > > K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:
> > > > On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
> > > > > K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
> > > > > > On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
> > > > > > > K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
> > > > > > > > If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an understanding of why you are getting a recursive error trap.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > – Bhaskar
> > > > > > > Hi Bhaskar,
> > > > > > >
> > > > > > > thank you for your instant reply.
> > > > > > > I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
> > > > > > > But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
> > > > > > >
> > > > > > > TEST3 ;
> > > > > > > S y=0
> > > > > > > S $ZT="D HDL"
> > > > > > > W 1/0
> > > > > > > Q
> > > > > > > HDL ;
> > > > > > > S y=y+1
> > > > > > > W "Error handled here.",!
> > > > > > > I y=10 ZSHOW "S" B
> > > > > > > Q
> > > > > > I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
> > > > > >
> > > > > > $ yottadb -run TEST3
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > Error handled here.
> > > > > > HDL+3^TEST3
> > > > > > TEST3+3^TEST3 ($ZTRAP)
> > > > > > %YDB-I-BREAK, Break instruction encountered
> > > > > > At M source location HDL+3^TEST3
> > > > > >
> > > > > > YDB>h
> > > > > > $
> > > > > >
> > > > > > As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
> > > > > >
> > > > > > “If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
> > > > > >
> > > > > > Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
> > > > > >
> > > > > > $ yottadb -run %XCMD 'zprint ^TEST3A'
> > > > > > TEST3A ;
> > > > > > S y=0
> > > > > > S $ET="D HDL"
> > > > > > W 1/0
> > > > > > Q
> > > > > > HDL ;
> > > > > > S y=y+1
> > > > > > W "Error handled here.",!
> > > > > > I y=10 ZSHOW "S" B
> > > > > > Q
> > > > > > $ yottadb -run TEST3A
> > > > > > Error handled here.
> > > > > > $
> > > > > >
> > > > > > Regards
> > > > > > – Bhaskar
> > > > > Maybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
> > > > There is no stack buildup. After the Q in HDL, control returns to the W 1/0.
> > > >
> > > This is what I thought, what the routine would do, but the output of the routine I posted first ends with:
> > >
> > > ...
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > Error handled here.
> > > %YDB-E-STACKCRIT, Stack space critical
> > Jens,
> >
> > I took a quick look:
> >
> > I think you are right that there may be an issue with YottaDB. We looked quickly at the code and it is adding something to the internal stack without taking it off every time $ZTRAP is invoked. I created this issue: https://gitlab.com/YottaDB/DB/YDB/-/issues/1037
> >
> > --Sam
> Jens,
>
> Your issue has been fixed in the master branch. It was indeed a bug as you suspected.
>
> --Sam

Hi Sam,
Thank you very much for fixing this!

Jens

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor