Soumya Ps

Soumya Ps

  • NA
  • 148
  • 16.5k

try catch...............

Apr 7 2018 9:36 AM
 I added a try catch in my code to raise error
 
but there shows error--->The name ex doesnot exist in the corrent contest
 
I also added a namespace--->using System.Runtime.Remoting.Contexts;
 
Still ex shows red in clr...How can I fix it? 
 
try
{
//line of code 
catch (Exception exc)
{
ex.errlog(exc, HttpContext.Current.Request.URL.ToString());
}

Answers (4)