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 | _]} ->
TZName
end;
get_timezone_inner(_) ->
throw({error, "Timezone should be string/binary"}).
get_timezone_inner(TZ) ->
throw({error, "Timezone should be string/binary", {provided_timezone, TZ}}).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").