From 2c01ab7efac7a0c242ab93f1f76697a91c77221f Mon Sep 17 00:00:00 2001 From: Namdak Tonpa Date: Sat, 18 May 2019 00:21:38 +0300 Subject: [PATCH] order matter --- src/protos/n2o_nitro.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/protos/n2o_nitro.erl b/src/protos/n2o_nitro.erl index 05ff2a70..c55403a8 100644 --- a/src/protos/n2o_nitro.erl +++ b/src/protos/n2o_nitro.erl @@ -76,7 +76,7 @@ render_ev(#ev{name=F,msg=P,trigger=T},_Source,Linked,State=#cx{module=M}) -> -ifdef(OTP_RELEASE). io(Event, #cx{module=Module}) -> - try {io,render_actions(nitro:actions()),Module:event(Event)} + try X = Module:event(Event), {io,render_actions(nitro:actions()),X} catch E:R:S -> ?LOG_EXCEPTION(E,R,S), {io,[],{stack,S}} end. io(Data) -> @@ -86,12 +86,12 @@ io(Data) -> -else. io(Event, #cx{module=Module}) -> - try {io,render_actions(nitro:actions()),Module:event(Event)} - catch E:R -> S = erlang:get_stacktrace(), ?LOG_EXCEPTION(E,R,S), {io,[],{stack,S}} end. + try X = Module:event(Event), {io,render_actions(nitro:actions()),X} + catch E:R -> S = erlang:get_stacktrace(), ?LOG_EXCEPTION(E,R,S), {io,<<>>,{stack,S}} end. io(Data) -> try {io,render_actions(nitro:actions()),Data} - catch E:R -> S = erlang:get_stacktrace(), ?LOG_EXCEPTION(E,R,S), {io,[],{stack,S}} end. + catch E:R -> S = erlang:get_stacktrace(), ?LOG_EXCEPTION(E,R,S), {io,<<>>,{stack,S}} end. -endif.