You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a good argument for a custom exception (GetPropertyByStringException?), or pass the name to ArgumentException.
I am try/catching the instantiation of DataTablesRequest so I can gracefully handle any invalid column configurations instead of my server blowing up with a 500 error. I think other people will want to do this too.
As it stands right now, I am unable to identify and report the "bad" column type.
Usage
// ...thrownewDataTablesGetPropertyByStringException(type,name);// Later in a catch(DataTablesGetPropertyByStringException ex) ...returnBadRequest($"Sorry, the property {ex.name} did not exist on {ex.type}");