Hi all, Recently, we got a bug report about YaST crashing[1] when the BOOTPROTO value in an ifcfg-* file is invalid. How to handle this situation? 1) We could detect that problem and inform the user through the Yast::Report module but, to be honest, I do not like having calls to Yast::Report.Error all over the place (we are somehow mixing business and UI logic). 2) We could raise an exception and report it to the user. But 1) it stops the workflow, and 2) we will raise an exception for each error we find. Moreover, sometimes you can recover from the error easily (but you might want to tell the user about it). So I thought it would be nice to have something similar to the AutoinstIssues mechanism[2]. Basically, you register any error you find and, at the end of the process, you report all the problems to the user at a single point. I have written some details and many open questions in a pull request[3]. I think the error classes (we might need a better name) should live in yast2.rpm, but for the discussion, let's keep everything in the same repository. Anyone interested, please, have a look at the pull request and add your thoughts about it. Thanks! Regards, Imo [1] https://bugzilla.suse.com/show_bug.cgi?id=1181296 [2] https://github.com/yast/yast-yast2/blob/master/library/general/src/lib/ installation/autoinst_issues.rb [3] https://github.com/yast/yast-network/pull/1204 -- Imobach González Sosa YaST Team at SUSE LLC https://imobachgs.github.io/
participants (1)
-
Imobach Gonzalez Sosa