Skip to content

Commit

Permalink
order matter
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed May 17, 2019
1 parent 4dd0dbc commit 2c01ab7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/protos/n2o_nitro.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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.

0 comments on commit 2c01ab7

Please sign in to comment.