View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed May 06, 2015 4:33 pm Post subject: Generate a TRACEBACK list, but keep running |
|
|
I wonder if there is a way to generate a traceback list as if a fatal error has occurred, but to keep running.
I'd like to be able to tell where in a long chain of routines an error has occurred and be able to track the calling chain to the source of the internal problem.
Obviously, I could cause a fault to occur, but many times an issue can occur that doesn't rise to a level of forcing the code to crash. It would be helpful in the debugging process to have the execution continue after noting (and logging) the issue.
Bill |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2391 Location: Yateley, Hants, UK
|
Posted: Thu May 07, 2015 9:57 am Post subject: |
|
|
FTN77 offered some routines that might be (have been?) helpful in what you are asking for. They are detailed in the FTN77 library manual pages 17-26, available online on this site.
There's a slight chance that one or more of the routines still work - perhaps Paul could advise. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri May 08, 2015 3:15 am Post subject: |
|
|
Thanks for the pointer to the FTN77 routines.
After reading through them, there's nothing there that satisfies the desire to cause an error to be signaled, yet continue execution.
Still looking... |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Fri May 08, 2015 7:50 am Post subject: |
|
|
I will give this some thought but here are two quick solutions...
1) Use /DEBUG and set a break point in the debugger.
2) Use "INT 3" in CODE/EDOC....
Code: | program main
code
int 3
edoc
print*, "OK"
end |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Fri May 08, 2015 8:04 am Post subject: |
|
|
Item 2 above may not be much use on its own.
A more direct approach is to use Plato where you have the option to "Run to cursor". Compile with /DEBUG, select the point in the code then use a right click and find "Run to cursor".
When in the debugger, the Stack/Status window gives you the trace-back. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2391 Location: Yateley, Hants, UK
|
Posted: Fri May 08, 2015 11:35 am Post subject: |
|
|
Bill, apologies that the FTN77 library wasn't useful in this case, but there are some routines there that may prove useful in the future.
Eddie |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri May 08, 2015 2:45 pm Post subject: |
|
|
Eddie, no problem. Yes, it will be useful in the future, I am sure.
Paul, many thanks for the options available to me. I'll see which one can work best for my situation. |
|
Back to top |
|
|
|