Author: rkeslar | Posted on: 12/30/2009 3:23:34 PM | Views : 450

I wrote a class libary and I'm not sure what to do about error handling. For example, a DataSet must be passed to a method in my library. I can't use a MessageBox.Show like I would in a desktop application since a library has no gui. What would you do?
I thought maybe something like this would be ok for validating input but I wasn't sure if this was the best thing to do
if (sourceDS == null)
{
           throw new Exception("A Dataset is required.");
} 
...

Go to the complete details ...