|
C.4 Comprehensive Built-in Crash Analysis
|
If your program has a fatal exception which stops it from running, sheerpower writes a crash error file
into the folder where the program is located. The name of the file is:
xxx_error.txt, where
xxx is the name of the source file.
The crash error file contains:
- Name of the source file where the error occurred
- Error message
- Specific routine involved
- Source line number of the error
- Relevant source code snippet
- Stack trace showing recently called routines
- Names and values of all variables in the program
- List of all open tables and files at the time of the crash
amount = 45
count = 0
do_main
stop
routine do_main
print 'average:'; amount/count
end routine
end
----
Division by zero at DO_MAIN.1
--- Call stack and recent routines ---
DO_MAIN.1: print 'average:'; amount/count
----------
Call Stack Depth: 1
MAIN.3: do_main
AMOUNT = 45
COUNT = 0
Using the built-in crash error file helps make debugging sheerpower programs quick and easy.