Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
expede committed Dec 28, 2016
1 parent 89ef2b8 commit 9833648
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,31 @@ thanks to the inversion of control.

%ArgumentError{message: "raise me"} >>> Enum.sum
#=> ** (ArgumentError) raise me

ensure!([1, 2, 3])
#=> [1, 2, 3]

#=> ensure!(%ArgumentError{message: "raise me"})
** (ArgumentError) raise me

defmodule Foo do
use Exceptional

def! foo(a), do: a
end

Foo.foo([1, 2, 3])
#=> [1, 2, 3]

Foo.foo(%ArgumentError{message: "raise me"})
#=> %ArgumentError{message: "raise me"}

Foo.foo!([1, 2, 3])
#=> [1, 2, 3]

Foo.foo!(%ArgumentError{message: "raise me"})
#=> ** (ArgumentError) raise me

```

### [Manually Branch](https://hexdocs.pm/exceptional/Exceptional.Control.html)
Expand Down

0 comments on commit 9833648

Please sign in to comment.