1
Vote

Exception lost while showing view in DockpanelWorkspace

description

I am showing one of the view in DockPanelWorkSpace, while it is being shown , For test I am throwing exception in View_Load event
 
void ModuleMainView_Load(object sender, EventArgs e)
    {
                   throw new Exception("Test");
    }
 
Once I try to debug above line, After throw statement it directly goes to Form.Visible = visible (in DockContentHandler.cs DockPanelSuite project ) and no exception is being caught anywhere.
 
internal void SetVisible()
    {
                       bool visible;
 
            if (IsHidden)
                visible = false;
            else if (Pane != null && Pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
                visible = true;
            else if (Pane != null && Pane.ActiveContent == Content)
                visible = true;
            else if (Pane != null && Pane.ActiveContent != Content)
                visible = false;
            else
                visible = Form.Visible;
 
            if (Form.Visible != visible)
                Form.Visible = visible; // this line
    }
 
Someone please help. Due to this we are not able to handle our business exceptions.

comments

jesterbratt wrote Dec 7, 2009 at 2:27 PM

I'm experiencing the same thing, was this ever resolved?
Thanks
Jess

wrote Feb 2, 2013 at 3:26 AM