I am a *huge* fan of returning exception structs instead of raising them, a few libraries follow this style as well like `exceptional` on hex.pm.
However, if you are wanting to format it, look at the Exception.message function, it takes an exception and formats it properly by looking at a message field on the struct or calling the modules message/1(?) function or whatever. On Monday, April 3, 2017 at 9:27:04 PM UTC-6, José Valim wrote: > > Btw, if I understand your concerns correctly, libraries tackle this by > returning exception structs. See DBConnection for an example. > -- > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R&D > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c47b9f-a648-45cc-8610-e75a98c02819%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
