I want to define simple global objects that contain a code and
description for custom errors. Is it a bad idea to use structs in an
initializer in the app?
This would actually display: "MyClass::APIParseError" I had a
misspelling since I didn't run it through an REPL to get the output I
just wrote it so of course typos can happen but it will show you the
right error class when you output it.
Ok, I would remove my previous post if I could but I can't access it
anymore.
In any case. I have improved that code to a better version where I rely
on raise and rescues to handle exceptions generated by the module. No
more ugly if xxxx != false
Anyway my question was not about how to generate exceptions but about
the fact of using a struc in my initializers.
This is a mailing list not a forum (though you may be accessing via a
forum like interface). Emails cannot be deleted by the sender. Once
it is on my machine only I can delete it (I hope, otherwise I am in
trouble).