From a96c0cbeb71df201c97fb58e8928dd5f69709d93 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Thu, 27 Dec 2018 23:08:58 +0100 Subject: [PATCH] Make KeyError.message/2 private It was introduced in https://github.com/elixir-lang/elixir/pull/7803, looks like it was accidentally made public (no docs, no specs) It shipped in Elixir v1.7 so technically this would be a breaking change. I'm happy to deprecate/doc false it instead. --- lib/elixir/lib/exception.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir/lib/exception.ex b/lib/elixir/lib/exception.ex index a679d6bdd0e..f582552193c 100644 --- a/lib/elixir/lib/exception.ex +++ b/lib/elixir/lib/exception.ex @@ -1178,7 +1178,7 @@ defmodule KeyError do def message(exception = %{message: nil}), do: message(exception.key, exception.term) def message(%{message: message}), do: message - def message(key, term) do + defp message(key, term) do message = "key #{inspect(key)} not found" if term != nil do