views:

92

answers:

1

I have noticed during some actions in MVC, such as an Edit ActionResult, if the UpdateModel fails it places the exception in to the ModelState, if I go through the collection I can find the exception.

However there is no StackTrace information.

So I have a few questions

1, How do I catch ModelState exceptions, in a generic way (ie one place)

2, How do I get the StackTrace from the ModelState

A: 

An exception does not get StackTrace information created until it is thrown, so if it is never thrown, it would not have any.

What kind of ModelState Exception? Is your UpdateModel inside a Try/Catch?

You may want to include more of your Edit action so we can see more of what's going on as well.

Maslow