Skip to content

Commit

Permalink
Merge pull request #1 from kylewhite21/feature/handle-bad-args
Browse files Browse the repository at this point in the history
handle arbitrary arg list
  • Loading branch information
seriyps authored Oct 16, 2023
2 parents 34b5d9c + a3d64b6 commit 8b0bece
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/logger_journald_h.erl
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ ensure_bytes(V) when is_list(V) ->
_ -> V
catch
error:badarg ->
unicode:characters_to_binary(V)
try unicode:characters_to_binary(V)
catch error:badarg ->
io_lib:format("~w", [V])
end
end;
ensure_bytes(V) when is_integer(V) ->
integer_to_binary(V);
Expand Down

0 comments on commit 8b0bece

Please sign in to comment.