I have a piece of try catch code:
try
{
...
}
catch(Exception ex)
{
ModelState.AddModelError(
\"duplicateInvoiceNumberOrganisation\", \"The com
Replace System.Threading.ThreadAbortException
with your exception.
try
{
//assume ThreadAbortException occurs here
}
catch (Exception ex)
{
if (ex.GetType().IsAssignableFrom(typeof(System.Threading.ThreadAbortException)))
{
//what you want to do when ThreadAbortException occurs
}
else
{
//do when other exceptions occur
}
}