I would like to know the right way of handling technical errors caused due to the in-line code in MVC Views. It could be due to ignorance of null check for an object before usage or some other reasons.
We use a BaseController class to handle all the errors related to each controller action method.
However, as we write in-line c# codes in views, how to appropriate handle these errors? what are the options available?