Skip to content

Commit

Permalink
Fix message for ensure_loaded!/1 in Gettext.Plural (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen authored Jan 21, 2023
1 parent 7b350bc commit e5ba065
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/gettext/plural.ex
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,12 @@ defmodule Gettext.Plural do
else
defp ensure_loaded!(mod) do
case Code.ensure_loaded(mod) do
{:module, ^mod} -> :ok
_other -> raise "<good error message>"
{:module, ^mod} ->
mod

{:error, reason} ->
raise ArgumentError,
"could not load module #{inspect(mod)} due to reason #{inspect(reason)}"
end
end
end
Expand Down

0 comments on commit e5ba065

Please sign in to comment.