Re: [Zope3-dev] More information when verifyClass or verifyObject fails

2006-02-24 Thread Morten W. Petersen
The three sorts of exceptions that the verify methods will raise are 
'DoesNotImplement' (you didn't actually declare the object to 
implement/provide the interface; no name is appropriate), 
'BrokenImplementation', and 'BrokenMethodImplementation' (both of which 
include a name, AFAICT in the code).  Maybe you got a 
"DoesNotImplement"?  I could see how it might be confusing.


These sorts of questions should probably go to zope3-users, btw.


OK, I'm subscribing to zope3-users now.  :)

-Morten
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] More information when verifyClass or verifyObject fails

2006-02-24 Thread Gary Poster


On Feb 24, 2006, at 4:41 PM, Morten W. Petersen wrote:


In both your emails, tracebacks would be helpful.


Yep.  :)

verifyObject/verifyClass (almost?) always gives the name of the  
part of the interface that it found lacking.  It is sometimes hard  
to parse the exception, I grant.  Care to give the tail end of the  
traceback and the interface?


I'm doing it play-by-play from a book, and unfortunately I don't  
have the code to reproduce it.  But as far as I can remember, it  
just said that the class or instance didn't verify against the  
interface, without any explanation of which attribute or method it  
was failing on, which could've been a good thing to know.


Cool.

The three sorts of exceptions that the verify methods will raise are  
'DoesNotImplement' (you didn't actually declare the object to  
implement/provide the interface; no name is appropriate),  
'BrokenImplementation', and 'BrokenMethodImplementation' (both of  
which include a name, AFAICT in the code).  Maybe you got a  
"DoesNotImplement"?  I could see how it might be confusing.


These sorts of questions should probably go to zope3-users, btw.

Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] More information when verifyClass or verifyObject fails

2006-02-24 Thread Morten W. Petersen

In both your emails, tracebacks would be helpful.


Yep.  :)

verifyObject/verifyClass (almost?) always gives the name of the part of 
the interface that it found lacking.  It is sometimes hard to parse the 
exception, I grant.  Care to give the tail end of the traceback and the 
interface?


I'm doing it play-by-play from a book, and unfortunately I don't have 
the code to reproduce it.  But as far as I can remember, it just said 
that the class or instance didn't verify against the interface, without 
any explanation of which attribute or method it was failing on, which 
could've been a good thing to know.


-Morten
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] More information when verifyClass or verifyObject fails

2006-02-24 Thread Gary Poster


On Feb 24, 2006, at 4:25 PM, Morten W. Petersen wrote:


Hi,

I'm playing with Zope 3, and I was wondering if it's possible to  
get more information about why verifyClass or verifyObject fails  
(on which attribute or method).


Am I blind, is it possible to set some options to display it, or is  
it a missing feature?


In both your emails, tracebacks would be helpful.

verifyObject/verifyClass (almost?) always gives the name of the part  
of the interface that it found lacking.  It is sometimes hard to  
parse the exception, I grant.  Care to give the tail end of the  
traceback and the interface?


Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com