c# Exception handling
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5457967/c-exception-handling">c# Exception handling</a>  </p>
</blockquote>



<p>Hi,</p>

<p>Greetings!</p>

<p>I am getting an error in my c# windows application as creation or updation fails system.exception only some times. i am adding my code below.Please give me some suggesion to get rid of this error.It works fine some times.</p>

<pre><code>try
{
  int itemId = TzThing.Set(xml, SessionDatabase, languageStr);
}
catch (Exception e)
{
  responseString = "create/update item failed, reason:" + e.Message;
  TouchServer.Log(Logger.MessageType.Error, 
            0, "Item create/update operation failed. Reason:" + e.Message);
}
</code></pre>

<p>Here set method is my insert or update operation.</p>

<p>Thankyou
regards
jennie</p>
