[erlang-questions] throwing from gen_server:init/1
Joel Reymont
joelr1@REDACTED
Wed Nov 23 15:50:08 CET 2011
I'm passing a proplist to the init function of my gen_server.
I need to ensure various options are present and validate them.
I also don't want to have a huge nested case statement.
Is it acceptable to throw or error when I cannot find or validate an option?
Are there better ideas?
N.B. The option values are assigned to fields of the gen_server state records.
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
More information about the erlang-questions
mailing list