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 7920 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:
Code
  1. MAIN
  2.  
  3.        CLOSE WINDOW SCREEN
  4.  
  5.        DEFER INTERRUPT
  6.        CALL startlog("errlog")
  7.  
  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
  25.  
  26.        CLOSE WINDOW test_wind
  27.  
  28. END MAIN
  29.  
My form:
Code
  1. DATABASE formonly
  2. LAYOUT
  3. GRID
  4. {
  5. [image1                                                                        ]
  6. }
  7. END
  8. ATTRIBUTES
  9. IMAGE image1:image1, IMAGE="test", PIXELWIDTH=640, PIXELHEIGHT=480,
  10.         STRETCH=BOTH;
  11.  
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.
Code
  1. Date: 02/12/2018    Time: 09:08:55
  2. Start of log
  3. Date: 02/12/2018    Time: 09:09:08
  4. one
  5.  
Thanks,
Candy
Reuben B.
Four Js
Posts: 1126


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

Candy,

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 http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_programs_010.html.  That is designed to handle case where front-end program is shut down in an orderly fashion

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
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!
Candy
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines