application startup failure?

Andy Kriger <>
Sat Nov 20 18:01:24 CET 2010


In my gen_server:init/1 function, I return {stop, Reason} if some
initialization step goes wrong (like creating a new mnesia schema or
tables)...
http://www.erlang.org/doc/man/gen_server.html#Module:init-1

I don't want to just return what mnesia returns because in some cases
the error is ok (like if the schema or table already exists)

However, when I start the application, I only see...
=INFO REPORT==== 20-Nov-2010::11:49:47 ===
    application: yaksha
    exited: {shutdown,{yaksha_app,start,[normal,[]]}}
    type: temporary
{error,{shutdown,{yaksha_app,start,[normal,[]]}}}

Where can I actually see the Reason returned by init which would tell
me why application startup is failing
I've looked through erlang.log.1 and don't see any details
Seems odd that the real reason would get swallowed by the
gen_server/application structure
Or maybe there's a better way to handle this situation?


More information about the erlang-questions mailing list