modules: fix/improve error logging

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-02-07 10:20:09 +01:00
parent 9d36f23b14
commit 34455c2c4c
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ v1.40-0-gf9dab50
#### $$VERSION$$ v1.45-dev-0-g9d36f23
# will be automatically sourced from bashbot
@ -93,7 +93,7 @@ promote_chat_member() {
*"invite"*) arg="can_invite_users";;
*"restrict"*) arg="can_restrict_members";;
*"promote"*) arg="can_promote_members";;
*) [ -n "${BASHBOTDEBUG}" ] && debug_log "${FUNCNAME[0]}: unknown promotion ${arg}"
*) [ -n "${BASHBOTDEBUG}" ] && log_debug "promote_chat_member: unknown promotion CHAT=${chat} USER=${user} PROM=${arg}"
continue;;
esac
# compose json

View File

@ -6,7 +6,7 @@
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
# shellcheck disable=SC1117
#### $$VERSION$$ v1.41-dev-1-g58fb001
#### $$VERSION$$ v1.45-dev-0-g9d36f23
# will be automatically sourced from bashbot
@ -260,7 +260,7 @@ send_file(){
BOTSENT[ERROR]="File not found: ${UPLOADDIR}/$2"
fi;;
esac
[ -n "${BASHBOTDEBUG}" ] && log_message "Error in upload_file: ${BOTSENT[ERROR]}"
[ -n "${BASHBOTDEBUG}" ] && log_debug "upload_file: CHAT=$1 FILE=$2 MSG=${BOTSENT[ERROR]}"
return
fi
# file OK, let's continue