elixir-lang/elixir-lang.github.com — pull request #363 by johan-carlsson (2014-09-25 16:17:30+00:00)
Title: Changed to defexception/1 inside a module in custom error example

I don't think you can define an exception outside of a model since defexception/3 has been deprecated.