Pass in the HttpContext.Current

Code:
//C#
public static void DoSomething(System.Web.HttpContext context)
{
  int r = 9, t= 0;
  float f = 0;
  try
  {
     f = r / t;
  }
  catch (System.DivideByZeroException)
  {
    context.Response.Redirect("http://www.google.com");
  }
}
Then, you call it like so:
Code:
MyErrorHandler.DoSomething(HttpContext.Current);