![](https://seccdn.libravatar.org/avatar/7ac97ea47b95f79d6f0501bd93df3062.jpg?s=120&d=mm&r=g)
On Donnerstag, 4. September 2008, Ladislav Slezak wrote:
My question is why is the failed check considered as a fatal error? Isn't it rather a minor problem? Would be an y2warning message enough instead of aborting the module?
It doesn't abort the module; it makes UI::OpenDialog() fail. You could easily catch that in YCP code (but it's not done anywhere in production code): http://svn.opensuse.org/svn/yast/trunk/ycp-ui-bindings/examples/ButtonBox2.y... void showDialog( term buttonBox ) { boolean success = (boolean) UI::OpenDialog( `VBox( `HVCenter( `Label( "Hello, World!" ) ), buttonBox ) ); // Most YCP developers never use the return value of UI::OpenDialog(). // Many of them probably don't even know that it has a return value. // // Used properly, that return value can be used to recover from error // situations that would otherwise abort the program - like in this //case. if ( success ) { UI::UserInput(); UI::CloseDialog(); } } Past experience shows that y2warning() calls are generally ignored, so they are pretty useless. CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Nürnberg, Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org