aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/asciidoc.mk
diff options
context:
space:
mode:
authorViktor Söderqvist <[email protected]>2020-11-12 14:30:59 +0100
committerLoïc Hoguin <[email protected]>2023-05-15 12:36:40 +0200
commitb7d8105ef0856bc30dfd018ccd357582a9f3f129 (patch)
treee93b2b5161df2cf0edbd7b08218d55a094522143 /plugins/asciidoc.mk
parent7d0babaaa11679c4d9c877e17a3ffab9c6664517 (diff)
downloaderlang.mk-b7d8105ef0856bc30dfd018ccd357582a9f3f129.tar.gz
erlang.mk-b7d8105ef0856bc30dfd018ccd357582a9f3f129.tar.bz2
erlang.mk-b7d8105ef0856bc30dfd018ccd357582a9f3f129.zip
Replace erlang:get_stacktrace() with catch C:E (V=0) or C:E:S (V>0)
This makes us compatible with OTP < 21, except when V (verbose) is set.
Diffstat (limited to 'plugins/asciidoc.mk')
-rw-r--r--plugins/asciidoc.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/asciidoc.mk b/plugins/asciidoc.mk
index f4be7ff..778308b 100644
--- a/plugins/asciidoc.mk
+++ b/plugins/asciidoc.mk
@@ -57,8 +57,8 @@ try
})
end || F <- [$(shell echo $(addprefix $(comma)\",$(addsuffix \",$1)) | sed 's/^.//')]],
halt(0)
-catch C:E ->
- io:format("Exception ~p:~p~nStacktrace: ~p~n", [C, E, erlang:get_stacktrace()]),
+catch C:E$(if $V,:S) ->
+ io:format("Exception: ~p:~p~n$(if $V,Stacktrace: ~p~n)", [C, E$(if $V,$(comma) S)]),
halt(1)
end.
endef