In such cases I use a longint parameter "level" to the recursive method. On 
first run this parameter is set to 1 and is incremented with every level of 
recursion. I then test for an arbitrary "level" (e.g. 1000) and abort the 
further recursion.

HTH
Ingo Wolf


4d_tech-requ...@lists.4d.com schrieb am Thu, 15 Nov 2018 12:00:01 -0800:
>From: Chip Scheide <4d_o...@pghrepository.org>
>To: 4D iNug Technical <4d_tech@lists.4d.com>
>Subject: v13 - how to manage not enough stack space error
>Message-ID: <20181115111943838786.b0800...@pghrepository.org>
>Content-Type: text/plain; charset=us-ascii
>
>
>I have a recursive routine (genology) 
>The routine is fine and works as expected - as long as the data is 
>valid.
>
>I was working in my test data, which I have apparently F*&^%ed and the 
>routine recurses until I get a stack error and 4D crashes (stand alone).
>
>How can I manage this so that I can exit the recursion gracefully with 
>a useful(?) error message. Memory available measurements? free stack 
>space?
>I.E. The operation is being truncated due to inconsistent data.
>
>Thanks 
>Chip


-- 
ViELMAC Ingo Wolf
Rheinhessenring 53A
D 55597 Wöllstein
Tel. +49 (0)6703 3070320
Fax  +49 (0)6703 3070321
e-mail i...@vielmac.de
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to