Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using Bugsnag.Clients;
  2. using System;
  3. using System.Web.Mvc;
  4.  
  5. namespace MyAwesomeWebApp
  6. {
  7. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
  8. public sealed class BugsnagExceptionHandler : HandleErrorAttribute
  9. {
  10. internal BugsnagExceptionHandler()
  11. {
  12. }
  13.  
  14. public override void OnException(ExceptionContext filterContext)
  15. {
  16. if (filterContext == null || filterContext.Exception == null)
  17. return;
  18.  
  19. if (Bugsnag.Clients.WebMVCClient.Config.AutoNotify)
  20. WebMVCClient.Notify(filterContext.Exception);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement