Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

How to implement OnException in ApiController ?

$
0
0

The ApiController does not implement OnException as in Controller. How can I implement this method if I subclass ApiController? I know I can control exception handling by using an ExceptionFilterAttrivute, but I would prefer to have it in my Controller class (because the controller already has code for loggin etc in place). Is it easy to implement (a few lines of code) and how? 


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>