Em Terça 02 Maio 2006 12:08, jvanasco escreveu:

>     i'm hoping that there's some what i can just do this:
>         tg_errors['_email_sending'] = 1 # which i'll catch in the
> function
>         tg_raise_error( form_print ) # which would treat things as if i
> called the error
>
>
> anyone have a clue?

Two.  

Why "1" and not "True"?  Python has True / False for boolean operations.

Why not raising an exception and the catching it?  This is the best idiom for 
errors, IMHO.

try:
   do_something()
except SpecificException, error_message:
   do_otherthing(error_message)


(Use of "error_message" is optional)


-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to