well, there is two questions:
1. if OpenDialog can raise exception
2. what happen to CloseDialog if OpenDialog do not succeed. - and according to code https://github.com/yast/yast-ycp-ui-bindings/blob/dda8aa1c0572b8cdef84eb3c85a07c1622974dbc/source/YCP_UI.cc#L587 it already close half open dialog. I think almost noone check value, so maybe it is good candidate to change it to raise exception if we are courage enough