well, there are 3 different things going on here I realize upon reflection:
data validation, connection / crud validation (basic "does the table exist; can I modify a row - does the row exist?); access control validation. I think your point was well made about need for exceptions, but I also am coming to realize (as I looked at the Crud class code) it's probably a little broader an issue. On Sat, Jul 11, 2009 at 1:55 PM, Vidul <[email protected]> wrote: > > Right, but there are many situations, in which the validators don't > own a problem and its domain. > > On Jul 11, 8:11 pm, Yarko Tymciurak <[email protected]> wrote: > > exception is a failed validation - a failed case. > > > > You are talking about IMPLICIT (and not, by the way, necessary) case of > > IS_IN_DB() > > > > The general case, it seems to me, is handling exceptions (errors) from > > validations. > > > > > > > > On Sat, Jul 11, 2009 at 11:54 AM, Vidul <[email protected]> wrote: > > > > > Sorry, Yarko, > > > > > I cannot understand what does a validator have to do with the > > > exception hangling? > > > > > On Jul 11, 7:40 pm, Yarko Tymciurak <[email protected]> wrote: > > > > that's a fall back situation (if all else fails); > > > > > > ... how is this different from any general validator failing? > > > > > > since validators return (value, error) - isn't this just IS_IN_DB() > ??? > > > > > > GIven how this affects forms (dropboxes???) --- I'm not sure how you > > > would > > > > use that in this situation... > > > > > > And maybe that's the problem - validators having too varied > > > responsibility > > > > (form control; value validation, ....) > > > > > > Maybe someone can show how (or how not to) apply IS_IN_DB() here? > > > > > > On Sat, Jul 11, 2009 at 11:06 AM, Vidul <[email protected]> > wrote: > > > > > > > Probably RecordNotFound exception or just an attribute like > > > > > crud.setting.record_not_found? > > > > > > > On Jul 11, 7:01 pm, mdipierro <[email protected]> wrote: > > > > > > You are right. we need to deal with that exception somehow. What > do > > > > > > you propose? > > > > > > > > massimo > > > > > > > > On Jul 11, 10:13 am, Vidul <[email protected]> wrote: > > > > > > > > > For example: > > > > > > > > > def update_comment(): > > > > > > > > > form=crud.update(db.comment, request.args(0)) > > > > > > > retur dict(form=form) > > > > > > > > > where args(0) does not exist in the database. > > > > > > > > > On Jul 11, 5:51 pm, mdipierro <[email protected]> wrote: > > > > > > > > > > What kind of exceptions? > > > > > > > > > > On Jul 11, 7:04 am, Vidul <[email protected]> wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > Auth and CRUD are amazing, no doubt, but is there a best > > > practice > > > > > for > > > > > > > > > the exception handler / ing of read / create / update / > delete > > > > > > > > > actions? > > > > > > > > > > > Thank you! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

