Allows authors and addon users to easily see errors generated by Python addons, having the potential to help fix broken addon functionality. Requires only ES 184.108.40.206+
Instructions: (included with addon)
Load ExceptHook [i]before all other addons[/i] in your autoexec.cfg with:[syntax="es"]es_load excepthook[/syntax]
When a Python addon for EventScripts raises an error the error will be logged in two places:
- In the folder [b]./addons/eventscripts/excepthook/[/b] you will find a file called [b]exceptions.txt[/b]. That file will contain the date and time of the error as well as the addon from which the error came. Check this file often to ensure no new errors have been seen.
- In the folder of the addon from where the error came you will find a text file (.txt) with the name of the addon followed by [b]_errors.txt[/b]. That file contains the the date and time the error occurred as well as the full error that was raised. This error information is invaluable for addon authors and authors should be immediately notified with the full text of the error when it occurs.
Both files may be deleted when the error or errors have been reported.
Not only will this error information benefit addon authors but it will also benefit addon users by potentially allowing authors to fix broken addon functions.
Any questions or comments about this addon should be directed to the forum link found at the bottom this page.
This addon has two internal options for configuring the maximum size of error logs. Please see the addon's source for more information.
Updated on: 2011-08-21 19:53:11 EST by SuperDave (View Zip Contents)
- Updated to use a general error log [b]./addons/eventscripts/excepthook/nofile_errors.txt[/b] when the module that generated the error cannot be found on disk ([b]<string>[/b], [b]<stdin>[/b], etc).
- Updated to read a maximum number of bytes from existing log files, capping each log size at just over 1 Mb (default).
- Updated the general exception file ([b]exceptions.txt[/b]) to include more exception information and to display most recent exceptions at the top rather than the bottom.
- Updated addon-specific log files to count the number of exception occurrences rather than appending the time and date of each occurrence and to display most recent exceptions at the top rather than the bottom.