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  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 
<== Date ==> <== Thread ==>

Subject: RE: caGateway crashes / use of *MustSucceed functions
From: "Jeff Hill" <johill@lanl.gov>
To: "'Dirk Zimoch'" <dirk.zimoch@psi.ch>
Cc: "'EPICS Tech Talk'" <tech-talk@aps.anl.gov>
Date: Mon, 23 May 2011 09:57:11 -0600
> This show why C++ exceptions are better than the good old C abort().


(100% agreement from here :-)

Jeff
______________________________________________________
Jeffrey O. Hill           Email        johill@lanl.gov
LANL MS H820              Voice        505 665 1831
Los Alamos NM 87545 USA   FAX          505 665 5107

Message content: TSPA

With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925


> -----Original Message-----
> From: Dirk Zimoch [mailto:dirk.zimoch@psi.ch]
> Sent: Monday, May 23, 2011 2:18 AM
> To: Jeff Hill
> Cc: 'EPICS Tech Talk'
> Subject: Re: caGateway crashes / use of *MustSucceed functions
> 
> 
> > [...] 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




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
Re: caGateway crashes / use of *MustSucceed functions Dirk Zimoch

Navigate by Date:
Prev: RE: vxWorks network problems Jeff Hill
Next: Re: When a record is changed twice very fast, camonitor only detects first change Tim Mooney
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 
Navigate by Thread:
Prev: Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Next: Re: caGateway crashes / use of *MustSucceed functions Jim Thomas
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 
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 ·