Please make failing method raise an exception instead of popping up an error Window!

Could RhinoCommon please throw an exception instead of popping up this dialog?

image

when running this bad code:

    import rhinoscriptsyntax as rs
    if not rs.IsLayer("A"):rs.AddLayer("A")
    if not rs.IsLayer("B"):rs.AddLayer("B")


    import scriptcontext as sc
    i = sc.doc.Layers.FindByFullPath("A",True)
    sc.doc.Layers[i].Name = "B" # This fails and pops up a UI Error Window

this issue seems to be related:
https://mcneel.myjetbrains.com/youtrack/issue/RH-48321

Hi @Goswin,

I’m not seeing this in Rhino 7, so I’m assuming the issue has been addressed.

– Dale

@dale Yes, in Rhino 7 it does not pop up an error window.
It just fails silently. without an exception. Not ideal but much better than the UI pop up.