On Mon, 23 Sep 2013 10:39:41 +0200 "Michal Filka" <[email protected]> wrote:
> Hi, > > I fully agree. Moreover, sometimes when exception is raised, module > do not complain at all and silently exits. That's (in my POV) very > confusing behavior for a user. > To be precise it is not silenty, but it sets exit code to non-zero value :) But I agree that it is bad behavior and also happen in old code when something goes wrong and nil is returned. Josef > Michal > > > Hi, > > as YaST currently lives in ruby and we would like to make code nice > > and benefit from its features it would be nice to change slightly > > current exception handling on outer bounds. > > > > Current exception handling involve only catching exception, logs it > > and then return false for clients and nil in other cases. I found > > it quite problematic, because problem is hidden inside logs ( and > > such behavior makes me crazy in past ) and module looks like > > working, except that it doesn't work, so it make impression that > > YaST doesn't work. > > > > I propose to change such behavior. If any uncatch exception is > > catch on bound ( it meands between ruby<->perl or in calling > > clients ), then Report.Error is used to notify that something goes > > wrong, with hint that you should report it and maybe message and > > last two places of exception there? And of course log full > > exception to log. > > > > Advantage of proposal is inform user that something goes wrong, so > > he doesn't get impression that YaST doesn't work (in case that you > > want to do something and nothing happened), just that YaST have a > > bug. We also can be less afraid of using nature ruby syntax and ruby > > exceptions, as we quickly recognize during testing that something is > > wrong and we can fix it. > > > > Any comments, ideas, counter-proposals? > > > > Thanks > > Josef -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
