File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ It can look redundant (compared to `if ! fn; then :; fi`) to define error functi
2727- ` core.err_set `
2828- ` core.err_clear `
2929- ` core.err_exists `
30- - ` core.err_print `
31- - ` core.err_print ` (TODO: Make this internal)
3230
3331### ` print `
3432
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ Core functions for any Bash program
1313* [ core.err_set()] ( #coreerr_set )
1414* [ core.err_clear()] ( #coreerr_clear )
1515* [ core.err_exists()] ( #coreerr_exists )
16- * [ core.err_print()] ( #coreerr_print )
1716* [ core.print_stacktrace()] ( #coreprint_stacktrace )
1817* [ core.print_error()] ( #coreprint_error )
1918* [ core.print_warn()] ( #coreprint_warn )
@@ -128,10 +127,6 @@ _does_ exist
128127
129128_ Function has no arguments._
130129
131- ### core.err_print()
132-
133- Prints the current error stored
134-
135130### core.print_stacktrace()
136131
137132Prints stacktrace
Original file line number Diff line number Diff line change @@ -241,13 +241,6 @@ core.err_exists() {
241241 fi
242242}
243243
244- # @description Prints the current error stored
245- core.err_print () {
246- printf ' %s\n' ' Error found:'
247- printf ' %s\n' " ERRCODE: $ERRCODE " >&2
248- printf ' %s\n' " ERR: $ERR " >&2
249- }
250-
251244# @description Prints stacktrace
252245# @noargs
253246# @example
@@ -330,7 +323,7 @@ core.panic() {
330323 if core.err_exists; then
331324 core.err_print
332325 fi
333- core.print_stacktrace
326+ core.util.err_print
334327 exit " $code "
335328}
336329
Original file line number Diff line number Diff line change @@ -31,3 +31,10 @@ core.util.trap_handler_common() {
3131 fi
3232 done ; unset trap_func
3333}
34+
35+ # @description Prints the current error stored
36+ core.util.err_print () {
37+ printf ' %s\n' ' Error found:'
38+ printf ' %s\n' " ERRCODE: $ERRCODE " >&2
39+ printf ' %s\n' " ERR: $ERR " >&2
40+ }
You can’t perform that action at this time.
0 commit comments