EPICS Home

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: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Mon, 23 May 2011 10:30:19 +0200
On Monday, May 23, 2011, Dirk Zimoch wrote:
> > [...] 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().

Certainly. If only one didn't have to buy all the other C++ trash together
with the very few features that are actually improvements over C...

> 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.

Cheers
Ben

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c. Wolfgang Eberhardt, Dr. Ulrich Breuer

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


References:
caGateway crashes / use of *MustSucceed functions Dirk Zimoch
RE: caGateway crashes / use of *MustSucceed functions Jeff Hill
Re: caGateway crashes / use of *MustSucceed functions Dirk Zimoch

Navigate by Date:
Prev: Re: caGateway crashes / use of *MustSucceed functions Dirk Zimoch
Next: vxWorks network problems Dirk Zimoch
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 Dirk Zimoch
Next: RE: caGateway crashes / use of *MustSucceed functions Jeff Hill
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