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.