Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/exceptional/control.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule Exceptional.Control do
defmacro branch(maybe_exception, [value_do: value_do, exception_do: exception_do]) do
quote do
maybe_exc = unquote(maybe_exception)
if Exception.exception?(maybe_exc) do
if Kernel.is_exception(maybe_exc) do
maybe_exc |> unquote(exception_do)
else
maybe_exc |> unquote(value_do)
Expand Down Expand Up @@ -82,7 +82,7 @@ defmodule Exceptional.Control do
defmacro if_exception(maybe_exception, do: exception_do, else: value_do) do
quote do
maybe_exc = unquote(maybe_exception)
if Exception.exception?(maybe_exc) do
if Kernel.is_exception(maybe_exc) do
maybe_exc |> unquote(exception_do)
else
maybe_exc |> unquote(value_do)
Expand Down
2 changes: 1 addition & 1 deletion lib/exceptional/normalize.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ defmodule Exceptional.Normalize do

plain = {error_type, status, stacktrace} ->
err = Exception.normalize(error_type, status, stacktrace)
if Exception.exception?(err), do: err, else: plain
if Kernel.is_exception(err), do: err, else: plain

{:ok, value} -> value
value -> conversion_fun.(value)
Expand Down
2 changes: 1 addition & 1 deletion lib/exceptional/raise.ex
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ defmodule Exceptional.Raise do

"""
def ensure!(maybe_exception) do
if Exception.exception?(maybe_exception) do
if Kernel.is_exception(maybe_exception) do
raise maybe_exception
else
maybe_exception
Expand Down
2 changes: 1 addition & 1 deletion lib/exceptional/tagged_status.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule Exceptional.TaggedStatus do
end

value ->
if Exception.exception?(value) do
if Kernel.is_exception(value) do
{:error, Exception.message(value)}
else
{:ok, value}
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Exceptional.Mixfile do
description: "Error & exception handling helpers for Elixir",

version: "2.1.3",
elixir: "~> 1.3",
elixir: "~> 1.11",

source_url: "https://github.com/expede/exceptional",
homepage_url: "https://github.com/expede/exceptional",
Expand Down