|
@@ -265,12 +265,14 @@
|
|
|
%% but it is not exported from the module.
|
|
|
%% So, maybe as a temporary measure, we redefine this type for passing full dialyzer analysis.
|
|
|
|
|
|
--ifdef('FUN_STACKTRACE').
|
|
|
--define(CAPTURE_STACKTRACE, ).
|
|
|
--define(GET_STACKTRACE, erlang:get_stacktrace()).
|
|
|
--else.
|
|
|
+-ifdef('OTP_RELEASE').
|
|
|
+%% The 'OTP_RELEASE' macro introduced at OTP-21,
|
|
|
+%% so we can use it for detecting whether the Erlang compiler supports new try/catch syntax or not.
|
|
|
-define(CAPTURE_STACKTRACE, :__StackTrace).
|
|
|
-define(GET_STACKTRACE, __StackTrace).
|
|
|
+-else.
|
|
|
+-define(CAPTURE_STACKTRACE, ).
|
|
|
+-define(GET_STACKTRACE, erlang:get_stacktrace()).
|
|
|
-endif.
|
|
|
|
|
|
%%--------------------------------------------------------------------------------
|