Jump to content
  • Advertisement
Sign in to follow this  

[.net] Toolbox item exceptions

This topic is 3472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This isn't related to games, but I hope someone can help. I'm making a forms application with C# and I use a lot of the visual tools because it speeds things up and I have less code to worry about. I would like to know if there is anyway to catch exceptions that occur from visual tools. Normally if your right the code yourself you just make a try catch block, but with the visual tools you can't see the code and can't put a try catch block around it. Here is my problem. I have a typed dataset and a instance of that dataset created by the tools in the toolbox. I then use a bindingsource from the toolbox and attach it to the dataset. The primary key needs to be unique. When you put in the same data in one row as there is in another row and navigate to another row it throws an exception that the value must be unique. The problem is I don't know how to catch the exception for this. There is no code to put a try catch and it crashes the program. If the only recourse it to create the dataset and binding source in code that sucks IMO. Thanks

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!