If timezone check crashes, specify what was actually passed as the timezone

This commit is contained in:
Jesse Gumm 2021-05-12 15:52:47 -05:00
parent 92b0438db5
commit f46392254b

View file

@ -244,8 +244,8 @@ get_timezone_inner(TimeZone) when is_list(TimeZone) ->
{ok, [TZName | _]} -> {ok, [TZName | _]} ->
TZName TZName
end; end;
get_timezone_inner(_) -> get_timezone_inner(TZ) ->
throw({error, "Timezone should be string/binary"}). throw({error, "Timezone should be string/binary", {provided_timezone, TZ}}).
-ifdef(TEST). -ifdef(TEST).
-include_lib("eunit/include/eunit.hrl"). -include_lib("eunit/include/eunit.hrl").