Skip to content

Commit

Permalink
Fix bug with incorrectly constructed assert_error
Browse files Browse the repository at this point in the history
Fixes a bug where using `luerl_lib:format_error({assert_error, <<"oh no">>})` would raise
  • Loading branch information
davydog187 committed Sep 9, 2024
1 parent 09c489c commit 232c8fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/luerl_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ format_error({no_module,Mod}) ->
%% Assertions
format_error({assert_error,Obj}) ->
if is_binary(Obj) ->
<<Obj,$!>>;
<<Obj/binary,$!>>;
true ->
Type = luerl_lib_basic:type(Obj),
<<"error object is a ",Type/binary,$!>>
Expand Down

0 comments on commit 232c8fe

Please sign in to comment.