Manages all aspects of error handling in Natural Docs.
NaturalDocs:: | Manages all aspects of error handling in Natural Docs. |
Variables | |
FH_CRASHREPORT | The filehandle used for generating crash reports. |
stackTrace | The stack trace generated by CatchDeath(). |
softDeath | Whether the program exited using SoftDeath(). |
currentAction | What Natural Docs was doing when it crashed. |
Functions | |
SoftDeath | Generates a “soft” death, which means the program exits like with Perl’s die(), but no crash report will be generated. |
OnStartParsing | Called whenever NaturalDocs::Parser starts parsing a source file. |
OnEndParsing | Called whenever NaturalDocs::Parser is done parsing a source file. |
OnStartBuilding | Called whenever NaturalDocs::Builder starts building a source file. |
OnEndBuilding | Called whenever NaturalDocs::Builder is done building a source file. |
HandleDeath | Should be called whenever Natural Docs dies out of execution. |
Support Functions | |
PerlVersion | Returns the current Perl version as a string. |
GenerateCrashReport | Generates a report and returns the FileName it’s located at. |
Signal Handlers | |
CatchDeath | Catches Perl die calls. |
my $stackTrace
The stack trace generated by CatchDeath().
my $softDeath
Whether the program exited using SoftDeath().
my $currentAction
What Natural Docs was doing when it crashed. This stores strings generated by functions like OnStartParsing().
sub OnStartParsing #( FileName file )
Called whenever NaturalDocs::Parser starts parsing a source file.
sub OnEndParsing #( FileName file )
Called whenever NaturalDocs::Parser is done parsing a source file.
sub OnStartBuilding #( FileName file )
Called whenever NaturalDocs::Builder starts building a source file.
sub OnEndBuilding #( FileName file )
Called whenever NaturalDocs::Builder is done building a source file.
sub GenerateCrashReport
Generates a report and returns the FileName it’s located at. Returns undef if it could not generate one.
The stack trace generated by CatchDeath().
my $stackTrace
Catches Perl die calls.
sub CatchDeath #( message )
Whether the program exited using SoftDeath().
my $softDeath
Generates a “soft” death, which means the program exits like with Perl’s die(), but no crash report will be generated.
sub SoftDeath #( message )
What Natural Docs was doing when it crashed.
my $currentAction
Called whenever NaturalDocs::Parser starts parsing a source file.
sub OnStartParsing #( FileName file )
Called whenever NaturalDocs::Parser is done parsing a source file.
sub OnEndParsing #( FileName file )
Called whenever NaturalDocs::Builder starts building a source file.
sub OnStartBuilding #( FileName file )
Called whenever NaturalDocs::Builder is done building a source file.
sub OnEndBuilding #( FileName file )
Should be called whenever Natural Docs dies out of execution.
sub HandleDeath
Returns the current Perl version as a string.
sub PerlVersion
Generates a report and returns the FileName it’s located at.
sub GenerateCrashReport