I have a customized ModelBinder which bind web from with a object using code like this”
[ModelBinder(typeof(CustomizedModelBinder))]
public class Widget{ ... }
This modelbinder may throw exceptions and where should I add code to catch those exceptions? Thanks in advance!
From design perspective it is better for a model binder to add model errors instead of throwing exceptions:
This way, later in your action you could check if the model is valid: