Skip to content

Commit

Permalink
Macro anti-patterns: fix incorrect error message in code examples (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
RKushnir committed Jan 16, 2024
1 parent 06fb7c0 commit 2fe859e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/elixir/pages/anti-patterns/macro-anti-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Routes do
end

if not is_atom(handler) do
raise ArgumentError, "route must be a module"
raise ArgumentError, "handler must be a module"
end

@store_route_for_compilation {route, handler}
Expand All @@ -51,7 +51,7 @@ defmodule Routes do
end

if not is_atom(handler) do
raise ArgumentError, "route must be a module"
raise ArgumentError, "handler must be a module"
end

Module.put_attribute(module, :store_route_for_compilation, {route, handler})
Expand Down

0 comments on commit 2fe859e

Please sign in to comment.