Mailinglist Archive: yast-devel (51 mails)

< Previous Next >
Re: [yast-devel] Assistance with logging and errors in yast-auth-server
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 28 Mar 2019 10:05:28 +0100
  • Message-id: <20190328100528.58737e76@linux-vvcf.privatesite>
V Thu, 28 Mar 2019 10:52:29 +1000
William Brown <wbrown@xxxxxxx> napsáno:

On 27 Mar 2019, at 17:02, Josef Reidinger <jreidinger@xxxxxxx> wrote:

V Wed, 27 Mar 2019 10:04:01 +1000
William Brown <wbrown@xxxxxxx> napsáno:

On 25 Mar 2019, at 16:52, Josef Reidinger <jreidinger@xxxxxxx> wrote:

Is there something I’m missing in YaST to show ruby exceptions or

Well, your problem is too generic exception catcher at
It catches all exceptions, which in general I do not recommend as it
catches beside user errors also programmers ones. At least you can change
it to `rescue RuntimeError`. And for sure always log what you catch
unless you re-raise it, so it is not silent as now.
And because you catch exception, then global exception handler is not in

Errghh, I would never have found that. I’ve never seen a language that
uses rescue as an exception handler! Anyway, I now have the actual error
now (which is apperently that “log” IE log.debug() can’t be found in

Welcome to ruby world. BTW ruby also have throw and catch, but for
different purpose. See

Thanks for your help, finally at a stage for a PR and some better review.
Please remember I’m inheriting this code, so not all the design decisions
were mine.


I did quick review. In general it looks good, just some tips. And one more
here. Please consider using rubocop to have consistent style and ideally try to
use yast style config, so it will be consistent with rest of yast modules.

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups