How do you mean "returning exception structs"? Isn't an exception something which is raised?
Robert On Tuesday, 4 April 2017 16:45:57 UTC+2, OvermindDL1 wrote: > > 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/9d04c8d9-7496-4eea-955f-008d19fc523a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
