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 8 and Version 9 of HowDoesErrorHandlingWork


Ignore:
Timestamp:
02/22/06 15:39:05 (9 years ago)
Author:
Luca <luca@…>
Comment:

Avoid ClassNames? to be treated as WikiNames?

Legend:

Unmodified
Added
Removed
Modified
  • HowDoesErrorHandlingWork

    v8 v9  
    7171Predefined schemas (see turbogears/errorhandling.py): 
    7272 
    73 * ''FailsafeSchema.none'': Default. No conversions are preformed, input remains as is: 
     73* ''!FailsafeSchema.none'': Default. No conversions are preformed, input remains as is: 
    7474{{{ 
    7575@validate(validators={...}) 
     
    8181''failsafe_values'' is ignored. 
    8282 
    83 * ''FailsafeSchema.values'': If ''failsafe_values'' is a dict, every input for which exists a key in ''failsafe_values'' is replaced with corresponding value. Otherwise all erroneous inputs are replaced with (same instance of!) ''failsafe_values''. 
     83* ''!FailsafeSchema.values'': If ''failsafe_values'' is a dict, every input for which exists a key in ''failsafe_values'' is replaced with corresponding value. Otherwise all erroneous inputs are replaced with (same instance of!) ''failsafe_values''. 
    8484{{{ 
    8585@validate(validators={"bar":validators.Int(), "baz":validators.Int()}, failsafe_schema=FailsafeSchema.values, failsafe_values={"bar":1, "baz":2}) 
     
    9191Both bar and baz are set to 13 when erroneous. 
    9292 
    93 * ''FailsafeSchema.map_errors'': Inputs are mapped to corresponding exceptions.  
     93* ''!FailsafeSchema.map_errors'': Inputs are mapped to corresponding exceptions.  
    9494{{{ 
    9595@validate(validators={"bar":validators.Int(), "baz":validators.Int()}, failsafe_schema=FailsafeSchema.map_errors)