On 9/9/11 12:37 PM, John Fabiani wrote: > All of us have run into this problem. If there is a solution or way to > recover from the error I'm in favor.
Here's my rough idea: ==================================== BACKGROUND The problem occurs during update(), where the biz.getFieldVal(control.DataField) isn't represented in control.Keys. Most commonly, the missing value is something like "" or None. There are many possibilities for why this situation would occur, and they all reduce down to human error somewhere, but the program crashing at the point of the update is far from ideal. Two things should happen instead: 1) The user is informed of the problem 2) The app otherwise keeps working ===================================== ROUGH PROPOSAL When the value from the bizobj isn't in the control's Keys, add a red exclamation point(!) icon somewhere on the control, which when clicked describes the problem to the user, and suggests that they now pick a valid value from the control. We need to be able to keep the current behavior of raising the exception (I for one want to keep the original behavior in my application, because I want to be informed of the issue and be forced to fix it[1] at once instead of maybe never even knowing about the problem), but the default behavior should be something like what I describe. Thoughts? Paul [1] My global error handler does a number of things, including writing an entry to the error log on my server, which in turn emails me new error reports, so I know within a few minutes of an error happening at any of my customer sites. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
