OT: A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll

OT: A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll

Old forum URL: forums.lhotka.net/forums/t/6068.aspx


triplea posted on Wednesday, December 31, 2008

This is of course something that I am doing wrong but I cannot pipoint where it is occuring. I have a usual editable form and the moment I assign the main datasource to my CSLA object as per usual:

myBindingSource.DataSource = myBoObject;

in the Output window I get a couple of the following messages:

A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll

I think it has a (slight) performance hit but more than anything it bugs me that I cannot find out the source of the problem. Is there anyway of finding out where these exceptions get generated?

Thanks

ajj3085 replied on Monday, January 05, 2009

You could probably set VS to break on all exceptions, and if you have the pdbs for the .net framework you should be able to see the code.

My experience though is that these messages print, and I'm not sure why... but it looks like the exception is handled in the library and you needn't worry about it unless your form isn't working.

triplea replied on Wednesday, January 07, 2009

Thanks I didn't know you could (or how to) do that. For anyone who might care:

http://blogs.msdn.com/davidklinems/archive/2005/07/19/440632.aspx

In my case these occur in my code but could never pin point where they occured. Now its fixing time...

Copyright (c) Marimer LLC