How to input and exception
<p>Ok here is a code I am working on. I am trying to get an exception so that way if they dont have something in the box to save it will pop up and not let them move on till the put something there. Now I know when I run my program and click the save button its tells me this</p>

<blockquote>
  <p>ArgumentException was unhandled</p>
</blockquote>

<p>what does that mean. I know it says empty path name is not legal. But the path is whatever the user wants. I have been messing around with this and im trying to figure out what to do but still kinda confused. So what is the best way to try to go about it. Do I have to make a class for it to work or can I just add into my code. I got the other part fixed with the try and catch but I can not get it to work on this one or maybe I have putting it in the wrong spot.</p>

<pre><code>private void Save_Click(object sender, EventArgs e)
{
    string path = txtFilePath.Text;    

    if (!File.Exists(path))
    {
        using (StreamWriter sw = File.CreateText(path))          
        {
            foreach (string lines in employeeList.Items)
                sw.WriteLine(lines);
        }
        else
        {
            using (StreamWriter sw = File.AppendText(path))&lt;--This is 
where is says Arugment exception was unhandled.              
            {    
                foreach (var item in employeeList.Items)
                    sw.WriteLine(item.ToString());
            }
        }
    }
}
</code></pre>
