mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
feat: expand logger with subshell-safe error handling
This commit is contained in:
@@ -43,6 +43,7 @@ error_handler() {
|
||||
local line_number="$1"
|
||||
local command="$2"
|
||||
printf "\e[?25h"
|
||||
log_error "line $line_number: exit code $exit_code while executing command $command"
|
||||
local error_message="[ERROR] in line $line_number: exit code $exit_code: while executing command $command"
|
||||
post_update_to_api "failed" "$command"
|
||||
echo -e "\n$error_message\n"
|
||||
|
||||
Reference in New Issue
Block a user