Move setopts out of try catch
-export([run/1]).
run(Module) ->
- try
io:setopts(standard_io, [binary, {encoding, utf8}]),
io:setopts(standard_error, [{encoding, utf8}]),
+ try
Module:main(),
erlang:halt(0)
catch
