Mailinglist Archive: yast-devel (80 mails)

< Previous Next >
Re: [yast-devel] Ruby-bindings and exception
Dne 14.2.2012 09:57, Lukas Ocilka napsal(a):
On 02/14/2012 09:13 AM, Jiri Suchomel wrote:
I welcome any other suggestions or comments. Also it would be nice to have
uniform python bindings solve such problem?

I do not think it is solved in python-bindings. I've just tested: when
exception is raised, YaST logs an error. But it does not crash

IMO it would be nice if error was logged anytime an exception is caught by

Having the last_error or maybe even last_exception (with details) method
would be
definitely a good approach.

When pkg-bindings catch an exception from libzypp the invoked Pkg:: call
returns nil
and Pkg::LastError() and Pkg::LastErrorDetails() return the details about the

Libzypp exceptions are automatically logged by libzypp when they are thrown
(pkg-bindings do not have to do anything special).

I think a similar way can be used also in Ruby bindings.


Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups