View Source Credo.Check.Consistency.ExceptionNames (Credo v1.7.5)


This check is enabled by default.

Learn how to disable it via .credo.exs.

This check has a base priority of high and works with any version of Elixir.


Exception names should end with a common suffix like "Error".

Try to name your exception modules consistently:

defmodule BadCodeError do
  defexception [:message]

defmodule ParserError do
  defexception [:message]

Inconsistent use should be avoided:

defmodule BadHTTPResponse do
  defexception [:message]

defmodule HTTPHeaderException do
  defexception [:message]

While this is not necessarily a concern for the correctness of your code, you should use a consistent style throughout your codebase.

Check-Specific Parameters

There are no specific parameters for this check.

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.