You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
421 B
17 lines
421 B
using System.Linq;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Web.Models;
|
|
|
|
namespace NzbDrone.Web.Filters
|
|
{
|
|
public class JsonErrorFilter : FilterAttribute, IExceptionFilter
|
|
{
|
|
public void OnException(ExceptionContext filterContext)
|
|
{
|
|
filterContext.Result = JsonNotificationResult.Opps(filterContext.Exception.Message);
|
|
filterContext.ExceptionHandled = true;
|
|
}
|
|
|
|
|
|
}
|
|
} |