diff --git a/include/utComMisc.hrl b/include/utComMisc.hrl index d4c1e46..6ae98f1 100644 --- a/include/utComMisc.hrl +++ b/include/utComMisc.hrl @@ -2,7 +2,7 @@ -define(IIF(Cond, Then, That), case Cond of true -> Then; _ -> That end). %% IF-DO表达式 --define(IF(IFTure, DoThat), (IFTure) andalso DoThat). +-define(IF(IFTure, DoThat), (IFTure) andalso (DoThat)). %%汉字unicode编码范围 0x4e00 - 0x9fa5 diff --git a/include/utParseStack.hrl b/include/utParseStack.hrl index 7003170..68a0bfd 100644 --- a/include/utParseStack.hrl +++ b/include/utParseStack.hrl @@ -6,6 +6,8 @@ -define(GET_STACK(_), erlang:get_stacktrace()). -endif. +-define(GSS(Stacktrace), try throw(0) catch _:_:Stacktrace -> Stacktrace end). + %% 追溯打印函数调用流程 -define(PRINT_STACK(Tag), Stack =