@@ -44,7 +44,7 @@ core.trap_add() {
44
44
fi ; unset regex
45
45
signal_spec=${signal_spec# SIG}
46
46
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
48
48
return 1
49
49
fi
50
50
@@ -56,7 +56,7 @@ core.trap_add() {
56
56
printf -v global_trap_handler_name ' %q' " core.trap_handler_${signal_spec} "
57
57
58
58
if ! eval " $global_trap_handler_name () {
59
- core.trap_handler_common '$signal_spec '
59
+ core.util. trap_handler_common '$signal_spec '
60
60
}" ; then
61
61
printf ' %s\n' " Error: core.trap_add: Could not eval function"
62
62
return 1
@@ -80,21 +80,21 @@ core.trap_remove() {
80
80
81
81
# validation
82
82
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"
84
84
return 1
85
85
fi
86
86
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"
88
88
return 1
89
89
fi
90
90
local regex=' ^[0-9]+$'
91
91
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"
93
93
return 1
94
94
fi ; unset regex
95
95
signal_spec=" ${signal_spec# SIG} "
96
96
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
98
98
return 1
99
99
fi
100
100
@@ -228,7 +228,7 @@ core.err_set() {
228
228
}
229
229
230
230
# @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 `
232
232
# @noargs
233
233
# @set number ERRCODE Error code
234
234
# @set string ERR Error message
0 commit comments