[Zope3-dev] Repost: Q on conf error reporting

Marius Gedminas mgedmin at b4net.lt
Fri Feb 13 12:05:12 EST 2004


On Tue, Feb 10, 2004 at 09:31:31PM +0000, Dave Harris wrote:
> I posted this just before all the list activity ramped up Sunday afternoon. 
> It's not as momentous as decisions about 'core' or 'inline', but I'd still 
> like to get a opinion.
<snip>
> >I added an server entry to zope.conf using a silly type:
> >
> ><server>
> >  type LEMMING
> >  address 8083
> ></server>
> >
> >and received (deservedly) a program failure marking my misdeed:
> >
> >Traceback (most recent call last):
<snip>
> >AttributeError: 'NoneType' object has no attribute 'create'
> >
> >This leads to a couple (or four) questions:
> >
> >1) When getServerType() returns None, should create() still proceed with 
> >the
> >servertype.create() call?

I would expect getServerType to raise an exception rather than returning
None.

BTW there seems to be a typo in ISimpleRegistry: it defines a method
called 'getF'.  I think it should be 'get'.

> >2) When a bad but well-formed configuration entry is processed, should Zope
> >3 report the specifics (e.g. the config file line and the reason for
> >failure)?

Yes.

> >3) In general, should Zope 3 disguise the fact that Python is the
> >implementation language - that is, not generate tracebacks?

I believe strongly that tracebacks should always imply a bug in the
software as opposed to user error.

How important this is at the current stage is a question I'm not
qualified to answer.  I'd venture a guess that there are more pressing
issues.

> >4) Would a test for this situation be a unit test of
> >zope.app.process.setup()? Or would it be considered a functional test?

A unit test seems to be more fitting in this case.

Marius Gedminas
-- 
Never trust a computer you can't repair yourself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20040213/aa582052/attachment.bin


More information about the Zope3-dev mailing list