Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Trapping -6302 error in GDC  (Read 6746 times)
Candy M.
Posts: 139

« on: February 12, 2018, 04:28:01 pm »

I'm attempting to execute some code when a 6302 error is thrown (this happens over ssh in GDC when user presses the blue circle close button on the second form of the GDC).   It appears in my CATCH block, I can not execute too much code, in fact it appears to be just one line.
Here is my program:
  1. MAIN
  6.        CALL startlog("errlog")
  8.        OPEN WINDOW test_wind WITH FORM "testdisconnect"
  9.        CALL errorlog("Start of log")
  10. TRY
  11.        MENU "MT"
  12.                ON ACTION cancel
  13.                        EXIT MENU
  14.                ON ACTION close
  15.                        EXIT MENU
  16.        END MENU
  17. CATCH
  18.        CALL errorlog("one")
  19.        sleep 1
  20.        CALL errorlog("two")
  21.        sleep 1
  22.        CALL errorlog("three")
  23.        EXIT PROGRAM
  24. END TRY
  26.        CLOSE WINDOW test_wind
  28. END MAIN
My form:
  1. DATABASE formonly
  3. GRID
  4. {
  5. [image1                                                                        ]
  6. }
  7. END
  9. IMAGE image1:image1, IMAGE="test", PIXELWIDTH=640, PIXELHEIGHT=480,
  10.         STRETCH=BOTH;
When I run the program and press the Close button on the right, and then confirm to stop, it
only shows that one statement was run.   I just want to confirm that that is all that is allowed.   I wanted
to connect to database and write a record, but was not able to do that even if I called another function.
  1. Date: 02/12/2018    Time: 09:08:55
  2. Start of log
  3. Date: 02/12/2018    Time: 09:09:08
  4. one
Reuben B.
Four Js
Posts: 1071

« Reply #1 on: February 13, 2018, 03:30:18 am »


I can't help but feel that this issue and your previous issue are a symptom of your SSH configuration, and that you should try and identify why your SSH is different from our other customers and their 15+ usage years of it.

I wonder in your SSH config, do you check the "Start Command in a New Shell Option"?.  I say that because there is no numerical limit on lines of code that can be executed in TRY/CATCH, WHENEVER ANY ERROR CALL scenarios although I'd recommend you keep such code concise.  My suspicion is that the gdc.exe shuts down after you select Quit, which also shuts down the fgltty terminal session containing the fglrun process, and so you only see 1 line being executed because the fglrun process or what is hosting it has died.

The other thing I'll make sure you are aware of is the OPTIONS ON CLOSE APPLICATION syntax  That is designed to handle case where front-end program is shut down in an orderly fashion


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
Contributor to
Candy M.
Posts: 139

« Reply #2 on: February 13, 2018, 06:18:57 am »

Thanks Reuben.
I've implemented the OPTIONS ON CLOSE APPLICATION and I'll have someone test it in our office as well.
I did not have the check the "Start Command in a New Shell" option checked.   I checked it and it made no difference.
Just as long as I know that several lines can be executed, I'm good.   Thanks again!
Pages: [1]
  Reply  |  Print  
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines