@@ -44,7 +44,7 @@ core.trap_add() {
4444 fi ; unset regex
4545 signal_spec=${signal_spec# SIG}
4646 if ! declare -f " $function " & > /dev/null; then
47- printf ' %s\n' " Error: core.trap_add: Function '$function ' not defined" >&2
47+ printf ' %s\n' " Error: core.trap_add: Function '$function ' is not defined" >&2
4848 return 1
4949 fi
5050
@@ -56,7 +56,7 @@ core.trap_add() {
5656 printf -v global_trap_handler_name ' %q' " core.trap_handler_${signal_spec} "
5757
5858 if ! eval " $global_trap_handler_name () {
59- core.trap_handler_common '$signal_spec '
59+ core.util. trap_handler_common '$signal_spec '
6060}" ; then
6161 printf ' %s\n' " Error: core.trap_add: Could not eval function"
6262 return 1
@@ -80,21 +80,21 @@ core.trap_remove() {
8080
8181 # validation
8282 if [ -z " $function " ]; then
83- printf ' %s\n' " Error: core.trap_add : First argument cannot be empty"
83+ printf ' %s\n' " Error: core.trap_remove : First argument cannot be empty"
8484 return 1
8585 fi
8686 if [ -z " $signal_spec " ]; then
87- printf ' %s\n' " Error: core.trap_add : Second argument cannot be empty"
87+ printf ' %s\n' " Error: core.trap_remove : Second argument cannot be empty"
8888 return 1
8989 fi
9090 local regex=' ^[0-9]+$'
9191 if [[ " $signal_spec " =~ $regex ]]; then
92- printf ' %s\n' " Error: core.trap_add : Passing numbers for the signal specs is prohibited"
92+ printf ' %s\n' " Error: core.trap_remove : Passing numbers for the signal specs is prohibited"
9393 return 1
9494 fi ; unset regex
9595 signal_spec=" ${signal_spec# SIG} "
9696 if ! declare -f " $function " & > /dev/null; then
97- printf ' %s\n' " Error: core.trap_add : Function '$function ' not defined" >&2
97+ printf ' %s\n' " Error: core.trap_remove : Function '$function ' is not defined" >&2
9898 return 1
9999 fi
100100
@@ -228,7 +228,7 @@ core.err_set() {
228228}
229229
230230# @description Clears any of the global error state (sets to empty string).
231- # This means any `core.err_exists` calls after this _will_ return `true `
231+ # This means any `core.err_exists` calls after this _will_ ` return 1 `
232232# @noargs
233233# @set number ERRCODE Error code
234234# @set string ERR Error message
0 commit comments