File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Core functions for any Bash program
1515* [ core.err_clear()] ( #coreerr_clear )
1616* [ core.err_exists()] ( #coreerr_exists )
1717* [ core.stacktrace_print()] ( #corestacktrace_print )
18+ * [ core.print_stacktrace()] ( #coreprint_stacktrace )
1819* [ core.print_error()] ( #coreprint_error )
1920* [ core.print_warn()] ( #coreprint_warn )
2021* [ core.print_info()] ( #coreprint_info )
@@ -133,14 +134,22 @@ _Function has no arguments._
133134
134135### core.stacktrace_print()
135136
137+ (DEPRECATED) Prints stacktrace
138+
139+ #### See also
140+
141+ * [ core.print_stacktrace] ( #coreprint_stacktrace )
142+
143+ ### core.print_stacktrace()
144+
136145Prints stacktrace
137146
138147#### Example
139148
140149``` bash
141150err_handler () {
142151 local exit_code=$?
143- core.stacktrace_print
152+ core.print_stacktrace
144153 exit $exit_code
145154}
146155core.trap_add ' err_handler' ERR
Original file line number Diff line number Diff line change @@ -269,16 +269,23 @@ core.err_exists() {
269269 fi
270270}
271271
272+ # @description (DEPRECATED) Prints stacktrace
273+ # @see core.print_stacktrace
274+ core.stacktrace_print () {
275+ core.print_warn " The function 'core.stacktrace_print' is deprecated in favor of 'core.print_stacktrace'"
276+ core.print_stacktrace " $@ "
277+ }
278+
272279# @description Prints stacktrace
273280# @noargs
274281# @example
275282# err_handler() {
276283# local exit_code=$?
277- # core.stacktrace_print
284+ # core.print_stacktrace
278285# exit $exit_code
279286# }
280287# core.trap_add 'err_handler' ERR
281- core.stacktrace_print () {
288+ core.print_stacktrace () {
282289 printf ' %s\n' ' Stacktrace:'
283290
284291 local old_cd=" $PWD " cd_failed=' no'
You can’t perform that action at this time.
0 commit comments