Author: aschnell Date: Fri Aug 24 11:41:48 2007 New Revision: 6861 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6861&view=rev Log: - include whole exception history - removed broken stuff Modified: trunk/libzypp-bindings/swig/RepoInfo.i trunk/libzypp-bindings/swig/ruby/ruby.i Modified: trunk/libzypp-bindings/swig/RepoInfo.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoInfo.i?rev=6861&r1=6860&r2=6861&view=diff ============================================================================== --- trunk/libzypp-bindings/swig/RepoInfo.i (original) +++ trunk/libzypp-bindings/swig/RepoInfo.i Fri Aug 24 11:41:48 2007 @@ -134,6 +134,3 @@ typedef std::list<RepoInfo> RepoInfoList; %template(RepoInfoList) std::list<RepoInfo>; -#ifdef SWIGRUBY -auto_iterator(std::list<RepoInfo>, RepoInfo); -#endif Modified: trunk/libzypp-bindings/swig/ruby/ruby.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/ruby.i?rev=6861&r1=6860&r2=6861&view=diff ============================================================================== --- trunk/libzypp-bindings/swig/ruby/ruby.i (original) +++ trunk/libzypp-bindings/swig/ruby/ruby.i Fri Aug 24 11:41:48 2007 @@ -29,6 +29,7 @@ } \ } + /* * Like iter2, but does only one dereferencing from the iterator. */ @@ -58,26 +59,15 @@ } -#define auto_iterator( cl, storetype ) \ -%mixin cl "Enumerable"; \ -%extend cl { \ - void each() { \ - cl::iterator i = self->begin(); \ - while ( i != self->end() ) { \ - rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(storetype), 0)); \ - ++i; \ - } \ - } \ -} - - -%exception { +%exception +{ try { $action } catch (const Exception& e) { static VALUE zyppexception = rb_define_class("ZYppException", rb_eStandardError); - rb_raise(zyppexception, e.asString().c_str()); + std::string tmp = e.historyAsString() + e.asUserString(); + rb_raise(zyppexception, tmp.c_str()); } } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org