[pygccxml-commit] SF.net SVN: pygccxml: [860]
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-01-09 06:20:09
|
Revision: 860
http://svn.sourceforge.net/pygccxml/?rev=860&view=rev
Author: roman_yakovenko
Date: 2007-01-08 22:20:10 -0800 (Mon, 08 Jan 2007)
Log Message:
-----------
improving error message
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py
pyplusplus_dev/unittests/mdecl_wrapper_tester.py
Modified: pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2007-01-08 17:28:00 UTC (rev 859)
+++ pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2007-01-09 06:20:10 UTC (rev 860)
@@ -10,6 +10,8 @@
The L{class<mdecl_wrapper_t>} allows user to not write "for" loops within the code.
"""
+import os
+
class call_redirector_t( object ):
"""Internal class used to call some function of objects"""
def __init__( self, name, decls ):
@@ -65,8 +67,10 @@
def __ensure_attribute( self, name ):
invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations )
+ sep = os.linesep + ' '
if invalid_decls:
- raise RuntimeError( "Not all declarations have '%s' attribute." % name )
+ raise RuntimeError( "Next declarations don't have '%s' attribute: %s"
+ % ( name, sep.join( map( str, invalid_decls ) ) ) )
def __setattr__( self, name, value ):
"""Updates the value of attribute on all declarations.
Modified: pyplusplus_dev/unittests/mdecl_wrapper_tester.py
===================================================================
--- pyplusplus_dev/unittests/mdecl_wrapper_tester.py 2007-01-08 17:28:00 UTC (rev 859)
+++ pyplusplus_dev/unittests/mdecl_wrapper_tester.py 2007-01-09 06:20:10 UTC (rev 860)
@@ -60,7 +60,7 @@
try:
mdw.call_policies = None
self.fail( "Runtime error has not been raised." )
- except RuntimeError:
+ except RuntimeError, err:
pass
def test__getitem__( self ):
@@ -108,4 +108,4 @@
unittest.TextTestRunner(verbosity=2).run( create_suite() )
if __name__ == "__main__":
- run_suite()
\ No newline at end of file
+ run_suite()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|