public ActionResult TestException() { var e = new DirectException("Oh no! Something bad happened!!!"); e.Data.Add("stringInfo", "Additional string information."); e.Data["intInfo"] = -903; e.Data["dateTimeInfo"] = DateTime.Now; throw e; return(Json("This line is never reached.")); }
public DirectResult TestException() { var e = new DirectException("This statement is the original exception message."); e.Data.Add("stringInfo", "Additional string information."); e.Data["intInfo"] = -903; e.Data["dateTimeInfo"] = DateTime.Now; throw e; return this.Direct("This line is never reached."); }