[erlang-questions] Style question
Thu May 12 20:48:22 CEST 2011
> This method works but is there a better way to do this?
I think you should assume that mnesia is up and running, and just
declare that as a dependency of your application. Then you only have
to try and read the data you want, and deal with the failure that the
data is not there or the table doesn't exist.
Then all the code is gone, and there is just a tiny bit more code in
your startup script to launch mnesia. The application:start() call
will fail if the mnesia dependency is not satisfied, and your code
will fail if the config data is not there.
More information about the erlang-questions