Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » How to handle error in Module_startup()?
How to handle error in Module_startup()? [message #1659] Thu, 12 March 2009 18:55 Go to next message
Ramsey Harris is currently offline Ramsey HarrisFriend
Messages: 22
Registered: July 2009
Junior Member
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
Re: How to handle error in Module_startup()? [message #1705 is a reply to message #1659] Mon, 16 March 2009 15:29 Go to previous message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Ramsey Harris wrote:
> 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().
Previous Topic:Problems with RTSC packages and legacy binary objects
Next Topic:Is there handle up-casting in meta-domain?
Goto Forum:
  


Current Time: Thu Apr 25 05:54:55 GMT 2024

Powered by FUDForum. Page generated in 0.03924 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top