# # Error handling # proc build_error_context {} { global username version # Should be done by Sentry TCL toolkit set context [dict create tcl_version [info patchlevel]] dict append context nameofexecutable [info nameofexecutable] dict append context environment [array get ::env] dict append context extensions [info loaded] dict append context error [dict create code $::errorCode info $::errorInfo stack [info errorstack]] # Can only be done by us set app_context [dict create username $username eggdrop_version $version] dict append app_context scripts_version [exec sh -c "cd scripts && git rev-parse HEAD"] dict merge $context $app_context }