Skip to content

Commit

Permalink
Fix typo in use Exceptional
Browse files Browse the repository at this point in the history
Rescue -> Raise
  • Loading branch information
Brooklyn Zelenka committed Aug 28, 2016
1 parent fec2f88 commit 8a1444a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Enum.OutOfBoundsError.exception("exception") ~> fn x -> x + 1 end.()
~> fn would_be_list ->
would_be_list
|> Enum.map(fn x -> x + 1 end)
|> Enum.sum
end.()
#=> %Enum.OutOfBoundsError{message: "exception"}

Expand All @@ -78,8 +79,9 @@ end.()
~> fn list ->
list
|> Enum.map(fn x -> x + 1 end)
|> Enum.sum
end.()
#=> [1,2,3]
#=> 6
```

### [Tagged Status](https://hexdocs.pm/exceptional/Exceptional.TaggedStatus.html)
Expand All @@ -98,9 +100,10 @@ end.()
~> fn list ->
list
|> Enum.map(fn x -> x + 1 end)
|< Enum.sum
end.()
|> to_tagged_status
#=> {:ok, [1,2,3]}
#=> {:ok, 6}
```

### [Finally Raise](https://hexdocs.pm/exceptional/Exceptional.Raise.html)
Expand All @@ -118,7 +121,7 @@ end.()
```elixir
Exceptional.Control.branch 1,
value_do: fn v -> v + 1 end.(),
exception_do: fn ex -> ex end.()
exception_do: fn %{message: msg} -> msg end.()
#=> 2

ArgumentError.exception("error message"),
Expand Down
2 changes: 1 addition & 1 deletion lib/exceptional.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule Exceptional do

defmacro __using__(_) do
quote do
import Exceptional.{Value, Raise, Rescue, TaggedStatus}
import Exceptional.{Value, Raise, Raise, TaggedStatus}
end
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Exceptional.Mixfile do
name: "Exceptional",
description: "Helpers for Elixir exceptions",

version: "1.0.3",
version: "1.0.4",
elixir: "~> 1.3",

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

0 comments on commit 8a1444a

Please sign in to comment.