4
Answers

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

Soumya Ps

Soumya Ps

6y
534
1
 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)