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  2011  2012  <20132014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: catching python exception in pcaspy
From: Jameson Graef Rollins <jrollins@ligo.caltech.edu>
To: Xiaoqiang Wang <xiaoqiang.wang@psi.ch>
Cc: Tech Talk <tech-talk@aps.anl.gov>
Date: Sun, 28 Jul 2013 15:26:39 -0700
On Sun, Jul 07 2013, Xiaoqiang Wang <xiaoqiang.wang@psi.ch> wrote:
> I have the same headache when debugging pcas applications.  The server
> tool library does not provides an exception handler, like in the CA
> client library, this error could only be checked from the
> console. Even though, the error seems ambiguous and can not be
> directly related to the python code.
>
> So I normally separate functions into its own module/class/function
> and test them.  And then interface to it by subclassing pcaspy Driver.

Hi, Xiaoqiang.  This method seems less than ideal, since without
subclassing the pcaspy.Driver to begin with a lot of the important
functionality is not testable.  For instance, db read/writes are not
possible, which is an important aspect of what the driver does.

I don't yet understand how the server itself works, or how pcaspy wraps
it, but I'm perplexed as to how the python exception is suppressed.  Is
there no way we could at least coax the server into display the python
exception error message to the console?

In lieu of that, would it be possible to put together some sort of dummy
server that would maybe not have all the functionality of the main
server, but would expose the python exceptions for testing?

jamie.

Attachment: pgpDPKzrSDPLM.pgp
Description: PGP signature


Replies:
Re: catching python exception in pcaspy Xiaoqiang Wang
References:
catching python exception in pcaspy Jameson Graef Rollins
Re: catching python exception in pcaspy Xiaoqiang Wang

Navigate by Date:
Prev: Re: CA question with two identical servers J. Lewis Muir
Next: FW: Problems with 64-bit EDM will.rogers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: catching python exception in pcaspy Xiaoqiang Wang
Next: Re: catching python exception in pcaspy Xiaoqiang Wang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·