Page MenuHomeDevCentral
Paste P314

Build error context for ViperServ eggdrops

Authored by dereckson on Mar 15 2023, 00:04.
Referenced Files
F2177791: Build error context for ViperServ eggdrops
Mar 15 2023, 00:04
# 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