I have the following on my base controller class which my other controllers inherit from:
[HandleError(ExceptionType = typeof(NotFoundException), View = "NotFound")]
[HandleError(ExceptionType = typeof(UnauthorisedException), View = "Unauthorised")]
I would like to be able to add the exception message into the view. So for example when I throw an exception:
throw new NotFoundException("This record was not found");
I could somehow grab this message and insert it into the NotFound view.