EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: caGateway crashes / use of *MustSucceed functions
From: Dirk Zimoch <[email protected]>
To: Jeff Hill <[email protected]>
Cc: "'EPICS Tech Talk'" <[email protected]>
Date: Mon, 23 May 2011 10:18:11 +0200

[...] One exception frequently cited is when
starting an IOC its maybe ok, but if this occurs in common library code then
it's probably going to be used inappropriately in other situations, and
surely eventually we will need to upgrade allowing online add and delete of
records and then it's less clear when iocInit starts and ends?

This show why C++ exceptions are better than the good old C abort(). If creation of a new record fails because of insufficient memory, an exception can be thrown. During run-time it should be caught and an error should be reported to the user that the record can't be added to the system. During initialization, it may be acceptable not to catch the exception which will in the end call abort(). Thus the application developer and not the support library developer decides if the application (here the ioc) must die or not.

By the way, if creation of a record fails because of a typo in a template file, the ioc happily continues starting up, but with one or many records missing -- even though this *is* a programming error, not a run-time problem.

Dirk



Replies:
Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
RE: caGateway crashes / use of *MustSucceed functions Jeff Hill
Re: caGateway crashes / use of *MustSucceed functions Jim Thomas
References:
caGateway crashes / use of *MustSucceed functions Dirk Zimoch
Re: caGateway crashes / use of *MustSucceed functions J. Lewis Muir
Re: caGateway crashes / use of *MustSucceed functions Dirk Zimoch
RE: caGateway crashes / use of *MustSucceed functions Jeff Hill

Navigate by Date:
Prev: CAJ Flow Control Bug David Brodrick
Next: Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: caGateway crashes / use of *MustSucceed functions Jeff Hill
Next: Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·