Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to handle error in Module_startup()?
https://www.eclipse.org/forums/index.php/mv/msg/656/1659/#msg_1659
What is the recommended way to handle and error in <<Mod>>_Module_startup()? Should I raise an error? Should I create a local error block and pass this to other modules? Should I always return NOTDONE when an error occurs?
Thanks
~ Ramsey]]>Ramsey Harris2009-03-12T18:55:51-00:00Re: How to handle error in Module_startup()?
https://www.eclipse.org/forums/index.php/mv/msg/656/1705/#msg_1705
> Champs,
>
> What is the recommended way to handle and error in
> <<Mod>>_Module_startup()? Should I raise an error? Should I create a
> local error block and pass this to other modules? Should I always return
> NOTDONE when an error occurs?
>
> Thanks
> ~ Ramsey
Since startup occurs _very_ early, before main(), it is best to _never_
fail in startup. It's very difficult for a user to determine what the
problme is when their application never makes it to main().
You can set a flag in your startup to indicate the failure and then fail
"normally" in your modules API's due to a startup problem.
If, on the other hand, it is important that the application not proceed
if the startup fails, you can call System_abort().]]>Dave Russo2009-03-16T15:29:24-00:00