Announcement

Collapse
No announcement yet.

Infinite Loop Break

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Infinite Loop Break

    Unless there is one I've not noticed, it would be useful to have a facility to terminate an efs that has gone into an infinite loop. Obviously the offending efs would have to be identified, but that can't be too difficult.

  • #2
    it would be great, but I don't know of an feature like this.

    I've created loops that never end by mistake and they can be a real pain.

    B
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Re: Infinite Loop Break

      Hi Dave180,

      There are some built in protections, a very nice one was discussed in this link.


      Originally posted by Dave180
      Unless there is one I've not noticed, it would be useful to have a facility to terminate an efs that has gone into an infinite loop. Obviously the offending efs would have to be identified, but that can't be too difficult.

      I have coded some infinite loops as well, and I am in agreement that they can be painful to recover from. FWIW, when using reloadEFS() or coding recursive functions (where I can get into the infinite loop situation) there are three things that have helped me.

      1) My default template does not auto load the efs I am working on. This prevents the problem efs from running after re-Start.

      2) When dealing with a problematic loop I will create a counter (global or local, it all depends) that increments itself each iteration. I will test the variable and throw an error or use a break statement after an excessive number of iterations to regain control. I will not do this every time, but on a case by case basis.

      3) Using debugPrintln and opening the formulaoutput.log file in the eSignal folder before re-Starting eSignal can provide clues as to the cause(s) of the infinite loop.

      This is how I have handled infinite loops and has kept me out trouble (knock on wood).

      Comment

      Working...
      X