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
15
15
* [ core.err_clear()] ( #coreerr_clear )
16
16
* [ core.err_exists()] ( #coreerr_exists )
17
17
* [ core.stacktrace_print()] ( #corestacktrace_print )
18
+ * [ core.print_stacktrace()] ( #coreprint_stacktrace )
18
19
* [ core.print_error()] ( #coreprint_error )
19
20
* [ core.print_warn()] ( #coreprint_warn )
20
21
* [ core.print_info()] ( #coreprint_info )
@@ -133,14 +134,22 @@ _Function has no arguments._
133
134
134
135
### core.stacktrace_print()
135
136
137
+ (DEPRECATED) Prints stacktrace
138
+
139
+ #### See also
140
+
141
+ * [ core.print_stacktrace] ( #coreprint_stacktrace )
142
+
143
+ ### core.print_stacktrace()
144
+
136
145
Prints stacktrace
137
146
138
147
#### Example
139
148
140
149
``` bash
141
150
err_handler () {
142
151
local exit_code=$?
143
- core.stacktrace_print
152
+ core.print_stacktrace
144
153
exit $exit_code
145
154
}
146
155
core.trap_add ' err_handler' ERR
Original file line number Diff line number Diff line change @@ -269,16 +269,23 @@ core.err_exists() {
269
269
fi
270
270
}
271
271
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
+
272
279
# @description Prints stacktrace
273
280
# @noargs
274
281
# @example
275
282
# err_handler() {
276
283
# local exit_code=$?
277
- # core.stacktrace_print
284
+ # core.print_stacktrace
278
285
# exit $exit_code
279
286
# }
280
287
# core.trap_add 'err_handler' ERR
281
- core.stacktrace_print () {
288
+ core.print_stacktrace () {
282
289
printf ' %s\n' ' Stacktrace:'
283
290
284
291
local old_cd=" $PWD " cd_failed=' no'
You can’t perform that action at this time.
0 commit comments