Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 12 and Version 13 of HowDoesErrorHandlingWork


Ignore:
Timestamp:
03/02/06 18:23:18 (9 years ago)
Author:
simon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowDoesErrorHandlingWork

    v12 v13  
    6969If validation fails for an input, said input also does not get to be converted to designated Python type, which could be rather inconvenient. A fail-safe mechanism is provided for such cases. Decorator ''validate'' can take two additional keyword arguments ''failsafe_scheme'' and ''failsafe_values'' to fine-tune how to failed inputs are handled.  
    7070 
    71 Predefined schemas (see turbogears/errorhandling.py): 
     71Predefined schemas (see source:trunk/turbogears/errorhandling.py): 
    7272 
    7373 * ''!FailsafeSchema.none'': Default. No conversions are preformed, input remains as is: 
     
    106106 ''failsafe_values'' is ignored. 
    107107 
    108 User defined schemas can be added by defining new specialisations for generic function ''errorhandling.dispatch_failsafe''. 
     108User defined schemas can be added by defining new specialisations for generic function ''errorhandling.dispatch_failsafe'' (see source:trunk/turbogears/errorhandling.py) with signature: 
     109{{{ 
     110dispatch_failsafe(schema, values, errors, source, kw) 
     111}}} 
    109112 
    110113 
     
    148151=== Source === 
    149152 
    150 http://trac.turbogears.org/turbogears/browser/trunk/turbogears/errorhandling.py 
     153source:trunk/turbogears/errorhandling.py 
    151154 
    152 http://trac.turbogears.org/turbogears/browser/trunk/turbogears/tests/test_errorhandling.py 
     155source:trunk/turbogears/tests/test_errorhandling.py 
    153156 
    154157=== Generic functions ===